Skip to content

TST: Set explicit styles for image tests#24709

Closed
oscargus wants to merge 1 commit intomatplotlib:mainfrom
oscargus:teststyles
Closed

TST: Set explicit styles for image tests#24709
oscargus wants to merge 1 commit intomatplotlib:mainfrom
oscargus:teststyles

Conversation

@oscargus
Copy link
Copy Markdown
Member

PR Summary

Change all image test styles to explicit so that it is possible to change the default at some later stage.

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

@oscargus
Copy link
Copy Markdown
Member Author

Turns out that these are not all, but all that was found in my IDE... I was surprised that it wasn't that many, but clearly I was wrong. Anyway, I expected to do this is steps, so this is one step.

@image_comparison(['agg_filter.png'], remove_text=True)
# # Update style when regenerating the test image
@image_comparison(['agg_filter.png'], remove_text=True,
style=("classic", "_classic_test_patch"))
Copy link
Copy Markdown
Member

@timhoffm timhoffm Dec 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this baseline + patch style combination is a bit bulky given that we write it all over the tests. I suggest to create a _classic_test style that hard-coded merges both.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oscargus were you going to update this? Overall I think this is a great idea...

@github-actions
Copy link
Copy Markdown

Since this Pull Request has not been updated in 60 days, it has been marked "inactive." This does not mean that it will be closed, though it may be moved to a "Draft" state. This helps maintainers prioritize their reviewing efforts. You can pick the PR back up anytime - please ping us if you need a review or guidance to move the PR forward! If you do not plan on continuing the work, please let us know so that we can either find someone to take the PR over, or close it.

@github-actions github-actions Bot added the status: inactive Marked by the “Stale” Github Action label Apr 13, 2026
@timhoffm
Copy link
Copy Markdown
Member

Superseeded by #31148.

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.

4 participants