Skip to content

Make sure that figures are closed when check_figures_equal finishes #15589

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

Conversation

MarcoGorelli
Copy link
Contributor

PR Summary

fixes #15079. Closes figures after check_figures_equal has finished so that different tests don't overwrite each others' figures.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

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

This would be rather painful to test because one would need to disable the "figure-autoclose" autofixture to see any effects, so I think this can go in without tests.

@dopplershift dopplershift merged commit 4ddf004 into matplotlib:master Nov 2, 2019
@MarcoGorelli MarcoGorelli deleted the close-plots-in-check-figures-equal branch November 2, 2019 17:32
@tacaswell tacaswell added this to the v3.3.0 milestone Nov 2, 2019
QuLogic added a commit that referenced this pull request Mar 17, 2020
Backport #15589 and #16693, fixes for check_figures_equal
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.

check_figures_equal decorator reuses figures if called multiple times inside a single test.
4 participants