Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
TST: Fix image comparison directory for test_striped_lines#28737
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Ok, but I would slightly prefer inlininglinewidth
as kwarg, analogous toalpha
to have all rc state set the same way.
The image comparison directory is determined by `inspect.getfile(func)`,but when a test is wrapped in `rc_context`, the file returned is`contextlib` since that decorator is `contextlib.contextmanager`. Sincethis test uses `check_figures_equal`, that doesn't break it, but it doesbreak the `triage_tests.py` tool as it cannot find a correspondingbaseline image directory.In this case, the context doesn't set anything that would affectfigures, so inline the effect of the context as keyword arguments.
Sure, we can do that. I initially thought this might affect the |
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.
Sorry I broke it!
5a9182d
intomatplotlib:mainUh oh!
There was an error while loading.Please reload this page.
… test_striped_lines
PR summary
The image comparison directory is determined by
inspect.getfile(func)
, but when a test is wrapped inrc_context
, the file returned iscontextlib
since that decorator iscontextlib.contextmanager
. Since this test usescheck_figures_equal
, that doesn't break it, but it does break thetriage_tests.py
tool as it cannot find a corresponding baseline image directory.Moving the
rc_context
decorator abovecheck_figures_equal
fixes the determined directory. While in this case, the context doesn't set anything that would affect figures, it also makes sense to set the context before figures are created.PR checklist