-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
TST: use pytest name in naming files for check_figures_equal #16693
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
TST: use pytest name in naming files for check_figures_equal #16693
Conversation
If you stacked `pytest.mark.parametrize` with check_figures_equal every set of parameters would write to the same file. This makes post-hoc debugging hard and causes intermittent CI failures.
They are preceded by a `*args` in the signature of wrapper.
765e08e
to
3b57fba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
postci
This seems to fail a lot; can we get it in 3.2.1 too? |
Is there an existing "make this a safe name" function someplace in the standard library or do we have to roll our own here? |
This is probably to stringent but this is better than blindly using the test name from pytest.
I'm not aware of anything like that. If anything I'd expect that in pathlib, but it is OS-depended, so would need to be handled in |
The failure was
This makes me think that we should be doing something similar in compare_images... |
abc9445 adds the comment from @QuLogic
which is definitely true! I think the tools we can use to do this are better now (3 years later). Might be worth re-visiting that decorator to see if we can make in simpler (and stop using the in-direct fixtur paramterization that pytest tried to deprecate). |
With #15199 backported, I think we should be able to backport this as well without conflicts. |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free to suggest an improvement. |
…_names TST: use pytest name in naming files for check_figures_equal
…_names TST: use pytest name in naming files for check_figures_equal
So we needed #15589 to avoid conflicts; it seems pretty non-controversial, so I included it in the backport above. |
This seems to have crossed with #16707, which has a test that takes
so I guess there's a reason I wrote that indirection comment... |
PR Summary
If you stacked
pytest.mark.parametrize
with check_figures_equalevery pass through would write to the same files. This uses the request fixture to extract the name.
PR Checklist