Skip to content

Commit

Permalink
Set faker_seed fixture to session scope
Browse files Browse the repository at this point in the history
Faker has changed its main fixture to be session scoped in v32 and uses faker_seed, so this needs to match.

Fix pytest-dev#656
  • Loading branch information
browniebroke committed Nov 14, 2024
1 parent 01a0f6c commit 28b43dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pytest_randomly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 28b43dd

Please sign in to comment.