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

Meta-issue tracking efforts towards param scope support in pytest #3

Open
blakeNaccarato opened this issue Oct 23, 2023 · 1 comment

Comments

@blakeNaccarato
Copy link
Contributor

blakeNaccarato commented Oct 23, 2023

pytest-param-scope emulates functionality that approximates what a fixture scope at the parametrized test level might achieve. In fact, native support for such a scope may come to pytest, and this issue tracks the related efforts. The following two issues directly track the interest for this feature:

However, implementation requires pytest's test collection node structure to understand functions at definition time, prior to parametrization. Also, pytest-dev/pytest#1552 (comment) and pytest-dev/pytest#1552 (comment) detail the implementation problem of how such a scope is not so simply defined, due to the fact that parametrize can be used on functions as well as fixtures, operating at various scopes. See further discussion in #1. And in pytest's backwards compatibility policy, it is explicitly stated that this feature effort constitutes a true breakage. We can see some of the broader upstream efforts related to the above feature requests:

Contributors are welcome to contribute here at pytest-param-scope to improve the emulation of param scope functionality until the massive overhaul in pytest properly supports the scope. I would also like to point potentially interested contributors towards helping the upstream effort for supporting param scope in pytest. However, most of the direct blockers touch a lot of the core parts of pytest, so the work is being carried out primarily by core pytest contributors. At the time of writing, then, the best way to help out pytest upstream is to follow their contribution guide, and work on issues designated as good first issues or those marked as help wanted.


Meta-meta-question: This developer-focused meta-issue has a lot of detail. Some of these details may be relevant to the user-focused readme documentation. If so, which details might be worth including there?

@okken
Copy link
Owner

okken commented Nov 7, 2023

This is a great write-up. thanks.

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

No branches or pull requests

2 participants