Skip to content

TST: Remove superfluous chdir from tests #27985

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

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Mar 28, 2024

PR summary

These tests don't chdir back to the original directory on exit, so anything using the current directory would be in the temporary directory of this test.

Most notably, any image comparison results would be dumped in that temporary directory instead of the usual result_images in the current directory.

I noticed this while debugging #27723, as the failing test images were not in the artifacts, and logs showed them saved in a temporary directory: https://github.com/matplotlib/matplotlib/actions/runs/8458560380/job/23173084420#step:13:183

PR checklist

These tests don't chdir back to the original directory on exit, so
anything using the current directory would be in the temporary directory
of this test.

Most notably, any image comparison results would be dumped in that
temporary directory instead of the usual `result_images` in the current
directory.
@QuLogic QuLogic added this to the v3.8.4 milestone Mar 28, 2024
@timhoffm timhoffm merged commit 0afc5d6 into matplotlib:main Mar 28, 2024
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 28, 2024
@QuLogic QuLogic deleted the remove-test-chdir branch March 28, 2024 06:20
@ksunden ksunden mentioned this pull request Apr 4, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants