Skip to content

feat(pytest): Initialize random seed for each test #5395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2025

Conversation

mkaruza
Copy link
Contributor

@mkaruza mkaruza commented Jul 1, 2025

Currently we set random seed for entire run. If test fails we would not see random seed output. Switch random seed to be per function so each variant and each test case initialize this.

@mkaruza mkaruza requested a review from dranikpg July 1, 2025 15:49
@mkaruza mkaruza force-pushed the mkaruza/pytest-random-seed-per-class branch from 790b4df to f9157be Compare July 1, 2025 16:09
Currently we set random seed for entire run. If test fails
we would not see random seed output. Switch random seed to be per
function so each variant and each test case initialize this.

Signed-off-by: mkaruza <mario@dragonflydb.io>
@mkaruza mkaruza force-pushed the mkaruza/pytest-random-seed-per-class branch from f9157be to ef7a6af Compare July 1, 2025 18:01
@mkaruza mkaruza changed the title feat(pytest): Initialize random seeder for each test feat(pytest): Initialize random seed for each test Jul 1, 2025
@mkaruza mkaruza merged commit 8a5fda0 into main Jul 2, 2025
10 checks passed
@mkaruza mkaruza deleted the mkaruza/pytest-random-seed-per-class branch July 2, 2025 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants