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

Conversation

browniebroke
Copy link

@browniebroke browniebroke commented Nov 14, 2024

Faker has changed its main fixture to be session scoped in v32 and uses faker_seed:

So the fixture from pytest-randomly needs to match the same scope

Fix #656

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
@@ -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 🤔

@fcurella
Copy link

I've reverted Faker's change in v33.0.0

@browniebroke
Copy link
Author

browniebroke commented Nov 14, 2024

I've reverted Faker's change in v33.0.0

Ok so I suppose we don't actually need this change anymore then, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ScopeMismatch on faker_seed with Faker v32.0.0
2 participants