From 28b43dd79058af74c4dec776cc1d4ed43681feb6 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Thu, 14 Nov 2024 12:26:04 +0000 Subject: [PATCH] Set faker_seed fixture to session scope Faker has changed its main fixture to be session scoped in v32 and uses faker_seed, so this needs to match. Fix #656 --- src/pytest_randomly/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pytest_randomly/__init__.py b/src/pytest_randomly/__init__.py index e6cd511..9cc8142 100644 --- a/src/pytest_randomly/__init__.py +++ b/src/pytest_randomly/__init__.py @@ -296,7 +296,7 @@ def _md5(string: str) -> bytes: if have_faker: # pragma: no branch - @fixture(autouse=True) + @fixture(autouse=True, scope="session") def faker_seed(pytestconfig: Config) -> int: result: int = pytestconfig.getoption("randomly_seed") return result