Skip to content

Fix test visualization tool for non-PNG files#27470

Merged
oscargus merged 2 commits intomatplotlib:mainfrom
QuLogic:fix-test-viz
Dec 8, 2023
Merged

Fix test visualization tool for non-PNG files#27470
oscargus merged 2 commits intomatplotlib:mainfrom
QuLogic:fix-test-viz

Conversation

@QuLogic
Copy link
Copy Markdown
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
Copy Markdown
Member

story645 commented Dec 8, 2023

uh how do we see these diffs?

@QuLogic
Copy link
Copy Markdown
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
Copy Markdown
Member

story645 commented Dec 8, 2023

Thanks #27471 😄

@oscargus oscargus merged commit 8fa89d6 into matplotlib:main Dec 8, 2023
@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.

3 participants