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

Extra Documentation For Importing Session Scoped Fixtures From A File #13326

Open
AyhamSaffar opened this issue Mar 25, 2025 · 0 comments
Open
Labels
topic: fixtures anything involving fixtures directly or indirectly

Comments

@AyhamSaffar
Copy link

What's the problem this feature will solve?

@RonnyPfannschmidt confirmed that issue #3217 is a feature, not a bug. This however created hours of confusion for me as it led to test-breaking exceptions that could not be explained by the relevant pytest docs.

Describe the solution you'd like

A Python warning explaining this behaviour when manually importing session-scoped fixtures would have allowed this problem to be instantly debugged.

Alternative Solutions

Adding a warning to the aforementioned docs / the docstring of the pytest fixture scope attribute.

Additional context

Love the library. Just looking out for the next person.

@Zac-HD Zac-HD added the topic: fixtures anything involving fixtures directly or indirectly label Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: fixtures anything involving fixtures directly or indirectly
Projects
None yet
Development

No branches or pull requests

2 participants