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

Generalize check figures equal to work with pytest.marks #600

Merged
merged 5 commits into from
Sep 11, 2020

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented Sep 11, 2020

Description of proposed changes

Our @check_figures_equal decorator used for comparing two images doesn't work with pytest.mark.parametrize. These are cherry-picked commits from #560.

Changes in this PR are following the cue of matplotlib's check_figures_equal decorator. See matplotlib/matplotlib#15199 and matplotlib/matplotlib#17267.

Note also issue #579 on how we should really just vendor off the check_figures_equal function in the future instead of keeping this bit of code up to date with matplotlib.

Fixes #

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

@weiji14 weiji14 added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Sep 11, 2020
@seisman
Copy link
Member

seisman commented Sep 11, 2020

Looks good, but note that the Style Checks is failing.

@weiji14
Copy link
Member Author

weiji14 commented Sep 11, 2020

Looks good, but note that the Style Checks is failing.

Ah yes, fixed.

@weiji14 weiji14 merged commit 85c08ef into master Sep 11, 2020
@weiji14 weiji14 deleted the parametrize_check_figures_equal branch September 11, 2020 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants