Skip to content

Commit 8a5fda0

Browse files
authored
feat(pytest): Initialize random seed for each test (#5395)
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 <[email protected]>
1 parent 2598f97 commit 8a5fda0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/dragonfly/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def test_env(tmp_dir: Path):
8888
return env
8989

9090

91-
@pytest.fixture(scope="session", params=[{}])
91+
@pytest.fixture(scope="function", params=[{}])
9292
def df_seeder_factory(request) -> DflySeederFactory:
9393
seed = request.config.getoption("--rand-seed")
9494
if seed is None:

0 commit comments

Comments
 (0)