Skip to content

When an image diff fails, re-convert the expected image and try again - #32677

Open
iccir wants to merge 1 commit into
matplotlib:mainfrom
iccir:force-convert
Open

iccir wants to merge 1 commit into
matplotlib:mainfrom
iccir:force-convert

Conversation

@iccir

@iccir iccir commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

PR summary

Per jklymak's suggestion in #32675: when an image comparison fails, re-convert the expected image and try the comparison again. This avoids a case where testing.compare.convert can use a stale file.

Closes #32675.

AI Disclosure

None used for implementation. I had AI generate a prototype test case, which I then modified.

PR quality check

  • Use an expressive title, e.g. "Fix title font property precedence"
  • New and changed code is tested
  • [/] Plotting related features are demonstrated in an example
  • [/] New features and API changes have release notes
  • [/] Documentation complies with general and docstring guidelines

@iccir iccir changed the title Force convert When an image diff fails, re-convert the expected image and try again Nov 27, 2026
@iccir

iccir commented Nov 27, 2026

Copy link
Copy Markdown
Member Author

If anyone knows why CI is still failing, I'd love to know. I'm out of ideas at this point.

Comment thread lib/matplotlib/testing/compare.py Resolved
@iccir
iccir marked this pull request as ready for review November 28, 2026 17:46
@iccir

iccir commented Nov 28, 2026

Copy link
Copy Markdown
Member Author

Reminder: I'm still learning Python. If there's a cleaner way to do this, let me know!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MNT]: testing.compare.convert can use stale files

2 participants