From cce58531198ffd0c562cb227326cf27616d55631 Mon Sep 17 00:00:00 2001 From: Robin <167366979+allrob23@users.noreply.github.com> Date: Thu, 15 May 2025 20:09:33 -0400 Subject: [PATCH] test: add seed for random in fixture --- tests/testnet/aio/conftest.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/testnet/aio/conftest.py b/tests/testnet/aio/conftest.py index 651417dd..a912c752 100644 --- a/tests/testnet/aio/conftest.py +++ b/tests/testnet/aio/conftest.py @@ -23,6 +23,12 @@ def event_loop(): loop.close() +@pytest.fixture(scope="session", autouse=True) +def set_random_seed(): + """Set a fixed seed for random number generation to ensure reproducibility.""" + random.seed(42) + yield + @pytest.fixture(scope="session") async def bitshares_instance(bitshares_testnet, private_keys, event_loop): """Initialize BitShares instance connected to a local testnet."""