Skip to content
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

Fix test visualization tool for non-PNG files #27470

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Dec 8, 2023

PR summary

For non-PNG files, our test diffing code creates a failed diff with a suffix of _{ext}-failed-diff.png, but the expected image has a suffix of -expected_{ext}.png. The test visualization was not correctly handling this difference by trimming filenames the same way for each case, resulting the expected/actual/diff images being split into non-existent test names.

Also, make the resulting file HTML5 compliant.

PR checklist

For non-PNG files, our test diffing code creates a failed diff with a
suffix of `_{ext}-failed-diff.png`, but the expected image has a suffix
of `-expected_{ext}.png`. The test visualization was not correctly
handling this difference.
@QuLogic QuLogic added this to the v3.9.0 milestone Dec 8, 2023
@story645
Copy link
Member

story645 commented Dec 8, 2023

uh how do we see these diffs?

@QuLogic
Copy link
Member Author

QuLogic commented Dec 8, 2023

You have to run tools/visualize_tests.py after running tests and having a result_images directory.

@story645
Copy link
Member

story645 commented Dec 8, 2023

Thanks #27471 😄

@oscargus oscargus merged commit 8fa89d6 into matplotlib:main Dec 8, 2023
41 checks passed
@QuLogic QuLogic deleted the fix-test-viz branch December 8, 2023 22:27
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.

None yet

3 participants