Different collection order if parametrized fixture is not function-scoped #13300
Unanswered
chbndrhnns
asked this question in
Q&A
Replies: 1 comment
-
Yes pytest is reordering tests to minimize the number of times higher scope fixtures have to be setup/ teardown |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I noticed an interesting behaviour when running this test module.
Using a function-scoped fixture, pytest orders the test list by functions:
When changing the scope to "class" or higher, pytest orders the test list by parameters:
Is this somehow expected?
It breaks the test tree view in Pycharm (cf. https://youtrack.jetbrains.com/issue/PY-61131/Using-parametrized-fixture-with-non-function-scope-loses-test-result-grouping).
Beta Was this translation helpful? Give feedback.
All reactions