Skip to content

TST: Ensure Matplotlib is always cleaned up #57389

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

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

QuLogic
Copy link
Contributor

@QuLogic QuLogic commented Feb 13, 2024

The seaborn test also uses Matplotlib but was not wrapped in the cleanup fixture, As there are now 3 files that need this fixture, refactor to reduce code duplication.

The leftover figure from test_seaborn would cause a DeprecationWarning from Matplotlib 3.8 for closing the figures on the backend change (from the mpl.use("template") in the fixture), but this probably depends on if pytest chose to run it before the other tests or not.

  • [n/a] closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • [n/a] Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

The seaborn test also uses Matplotlib but was not wrapped in the cleanup
fixture, As there are now 3 files that need this fixture, refactor to
reduce code duplication.
@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Feb 13, 2024
@mroeschke mroeschke added this to the 3.0 milestone Feb 13, 2024
@mroeschke mroeschke merged commit 1d7aedc into pandas-dev:main Feb 13, 2024
@mroeschke
Copy link
Member

Thanks @QuLogic

@QuLogic QuLogic deleted the test-mpl-cleanup branch February 13, 2024 03:18
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
The seaborn test also uses Matplotlib but was not wrapped in the cleanup
fixture, As there are now 3 files that need this fixture, refactor to
reduce code duplication.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants