Skip to content

Commit 196678b

Browse files
authored
Merge pull request bitshares#329 from allrob23/patch-seed
add seed for random in test fixture
2 parents e39f658 + cce5853 commit 196678b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/testnet/aio/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ def event_loop():
2323
loop.close()
2424

2525

26+
@pytest.fixture(scope="session", autouse=True)
27+
def set_random_seed():
28+
"""Set a fixed seed for random number generation to ensure reproducibility."""
29+
random.seed(42)
30+
yield
31+
2632
@pytest.fixture(scope="session")
2733
async def bitshares_instance(bitshares_testnet, private_keys, event_loop):
2834
"""Initialize BitShares instance connected to a local testnet."""

0 commit comments

Comments
 (0)