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

MAINT: Improved isolation and cleanup of matplotlib tests #3792

Merged
merged 3 commits into from
Aug 17, 2024

Conversation

connortann
Copy link
Collaborator

@connortann connortann commented Aug 11, 2024

Improved isolation of matplotlib tests:

  • Call plt.close() after each test, rather than before
  • Moves the matplotlib fixture to the top level, as there are some plotting tests outside of tests/plots
  • Set the matplotlib backend in the fixture, rather than as an import-level side-effect in various places.
  • Ensures show=False is passed, to fix test warnings about plotting in a non-interactive environment

@connortann connortann added skip-changelog PRs that should be excluded from the changelog visualization Relating to plotting labels Aug 11, 2024
Copy link

codecov bot commented Aug 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.64%. Comparing base (13f6730) to head (1222d3f).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3792       /-   ##
==========================================
- Coverage   62.66%   62.64%   -0.03%     
==========================================
  Files          91       91              
  Lines       12819    12819              
==========================================
- Hits         8033     8030       -3     
- Misses       4786     4789        3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@connortann connortann marked this pull request as ready for review August 11, 2024 11:13
Copy link
Collaborator

@thatlittleboy thatlittleboy left a comment

Choose a reason for hiding this comment

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

nice use of plt.rc_context()!

singapore-nsp-thumbsup-man

@connortann connortann merged commit d180dab into master Aug 17, 2024
16 of 17 checks passed
@connortann connortann deleted the mpl-backend branch August 17, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog PRs that should be excluded from the changelog visualization Relating to plotting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants