File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 5757 have_numpy = False
5858
5959
60- default_seed = random .Random ().getrandbits (32 )
60+ def make_seed () -> int :
61+ return random .Random ().getrandbits (32 )
6162
6263
6364def seed_type (string : str ) -> str | int :
@@ -112,13 +113,13 @@ def pytest_configure(config: Config) -> None:
112113 "The cacheprovider plugin is required to use 'last'"
113114 )
114115 assert config .cache is not None
115- seed = config .cache .get ("randomly_seed" , default_seed )
116+ seed = config .cache .get ("randomly_seed" , make_seed () )
116117 elif seed_value == "default" :
117118 if hasattr (config , "workerinput" ): # pragma: no cover
118119 # pytest-xdist: use seed generated on main.
119120 seed = config .workerinput ["randomly_seed" ]
120121 else :
121- seed = default_seed
122+ seed = make_seed ()
122123 else :
123124 seed = seed_value
124125 if hasattr (config , "cache" ):
You can’t perform that action at this time.
0 commit comments