-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Automatic grouping of tests by fixture instances broken when using metafunc.parametrize #661
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
Comments
I was looking into this today. |
Sounds good @kvas-it, thanks for looking into this man! Let me know if I can help out, although tomorrow I'm not sure if I will available much. |
I did a bunch of experiments with this today. Here's a brief report of key findings. TLDR: The behaviour described here is correct because second example is parametrizing the functions and not the fixture. However, we might want to take care of some unobvious sharp corners of the parametrization API:
|
@kvas-it Do you think anything of this should block 3.0, or should we change the milestone for this to 4.0? |
IMO this shouldn't block anything because I think we don't want to change current behaviour and would only add warnings for some confusing cases + update the documentation. So it could be in any minor release later too. |
I don't really do, sorry - I haven't used parametrization other than |
Originally reported by: BitBucket: davidkr, GitHub: davidkr
from
Automatic grouping of tests by fixture instances
However the grouping doesn't seem to be working when using
metafunc.parametrize
. Below is an example of what I mean. Here's the test code...The output from running the tests..
So the things get group as I would expect. However I use metafunc to parametrize the burger fixture instead of the decorator by doing this...
..then the order changes and all instances of
test_burger
get run first and the output looks like this....The text was updated successfully, but these errors were encountered: