Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set faker_seed fixture to session scope #657

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 3 additions & 3 deletions tests/requirements/py310.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ factory-boy==3.3.1 \
--hash=sha256:7b1113c49736e1e9995bc2a18f4dbf2c52cf0f841103517010b1d825712ce3ca \
--hash=sha256:8317aa5289cdfc45f9cae570feb07a6177316c82e34d14df3c2e1f22f26abef0
# via -r requirements.in
faker==30.8.1 \
--hash=sha256:4f7f133560b9d4d2a915581f4ba86f9a6a83421b89e911f36c4c96cff58135a5 \
--hash=sha256:93e8b70813f76d05d98951154681180cb795cfbcff3eced7680d963bcc0da2a9
faker==32.1.0 \
--hash=sha256:aac536ba04e6b7beb2332c67df78485fc29c1880ff723beac6d1efd45e2f10f5 \
--hash=sha256:c77522577863c264bdc9dad3a2a750ad3f7ee43ff8185072e482992288898814
# via
# -r requirements.in
# factory-boy
Expand Down
6 changes: 3 additions & 3 deletions tests/requirements/py311.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ factory-boy==3.3.1 \
--hash=sha256:7b1113c49736e1e9995bc2a18f4dbf2c52cf0f841103517010b1d825712ce3ca \
--hash=sha256:8317aa5289cdfc45f9cae570feb07a6177316c82e34d14df3c2e1f22f26abef0
# via -r requirements.in
faker==30.8.1 \
--hash=sha256:4f7f133560b9d4d2a915581f4ba86f9a6a83421b89e911f36c4c96cff58135a5 \
--hash=sha256:93e8b70813f76d05d98951154681180cb795cfbcff3eced7680d963bcc0da2a9
faker==32.1.0 \
--hash=sha256:aac536ba04e6b7beb2332c67df78485fc29c1880ff723beac6d1efd45e2f10f5 \
--hash=sha256:c77522577863c264bdc9dad3a2a750ad3f7ee43ff8185072e482992288898814
# via
# -r requirements.in
# factory-boy
Expand Down
6 changes: 3 additions & 3 deletions tests/requirements/py312.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ factory-boy==3.3.1 \
--hash=sha256:7b1113c49736e1e9995bc2a18f4dbf2c52cf0f841103517010b1d825712ce3ca \
--hash=sha256:8317aa5289cdfc45f9cae570feb07a6177316c82e34d14df3c2e1f22f26abef0
# via -r requirements.in
faker==30.8.1 \
--hash=sha256:4f7f133560b9d4d2a915581f4ba86f9a6a83421b89e911f36c4c96cff58135a5 \
--hash=sha256:93e8b70813f76d05d98951154681180cb795cfbcff3eced7680d963bcc0da2a9
faker==32.1.0 \
--hash=sha256:aac536ba04e6b7beb2332c67df78485fc29c1880ff723beac6d1efd45e2f10f5 \
--hash=sha256:c77522577863c264bdc9dad3a2a750ad3f7ee43ff8185072e482992288898814
# via
# -r requirements.in
# factory-boy
Expand Down
6 changes: 3 additions & 3 deletions tests/requirements/py313.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ factory-boy==3.3.1 \
--hash=sha256:7b1113c49736e1e9995bc2a18f4dbf2c52cf0f841103517010b1d825712ce3ca \
--hash=sha256:8317aa5289cdfc45f9cae570feb07a6177316c82e34d14df3c2e1f22f26abef0
# via -r requirements.in
faker==30.8.1 \
--hash=sha256:4f7f133560b9d4d2a915581f4ba86f9a6a83421b89e911f36c4c96cff58135a5 \
--hash=sha256:93e8b70813f76d05d98951154681180cb795cfbcff3eced7680d963bcc0da2a9
faker==32.1.0 \
--hash=sha256:aac536ba04e6b7beb2332c67df78485fc29c1880ff723beac6d1efd45e2f10f5 \
--hash=sha256:c77522577863c264bdc9dad3a2a750ad3f7ee43ff8185072e482992288898814
# via
# -r requirements.in
# factory-boy
Expand Down
6 changes: 3 additions & 3 deletions tests/requirements/py39.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ factory-boy==3.3.1 \
--hash=sha256:7b1113c49736e1e9995bc2a18f4dbf2c52cf0f841103517010b1d825712ce3ca \
--hash=sha256:8317aa5289cdfc45f9cae570feb07a6177316c82e34d14df3c2e1f22f26abef0
# via -r requirements.in
faker==30.8.1 \
--hash=sha256:4f7f133560b9d4d2a915581f4ba86f9a6a83421b89e911f36c4c96cff58135a5 \
--hash=sha256:93e8b70813f76d05d98951154681180cb795cfbcff3eced7680d963bcc0da2a9
faker==32.1.0 \
--hash=sha256:aac536ba04e6b7beb2332c67df78485fc29c1880ff723beac6d1efd45e2f10f5 \
--hash=sha256:c77522577863c264bdc9dad3a2a750ad3f7ee43ff8185072e482992288898814
# via
# -r requirements.in
# factory-boy
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pytest_randomly.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ def test_one(faker):
assert faker.name() == 'Ryan Gallagher'

def test_two(faker):
assert faker.name() == 'Ryan Gallagher'
assert faker.name() == 'Jon Cole'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line changed when I updated faker to v32 🤔

"""
)

Expand Down