Title: Simplify cleanup decorator implementation. by anntzer · Pull Request #11292 · matplotlib/matplotlib · GitHub
Open Graph Title: Simplify cleanup decorator implementation. by anntzer · Pull Request #11292 · matplotlib/matplotlib
X Title: Simplify cleanup decorator implementation. by anntzer · Pull Request #11292 · matplotlib/matplotlib
Description: Introduce a single private _cleanup_cm contextmanager and use it to implement CleanupTestCase and @cleanup. Use warnings.catch_warnings to avoid completely destroying a preexisting warnings filter, instead just restoring the filter that existed before the test started. Use matplotlib.style.context to restore the style at exit, as it relies on rc_context which is ultimately more efficient than rcParams.update as it skips revalidation. Deprecate CleanupTest (and implement it in terms of CleanupTestCase), as it is clearly a nose-oriented base class that could have been deprecated at the same time as ImageComparisonTest. PR Summary PR Checklist Has Pytest style unit tests Code is PEP 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
Open Graph Description: Introduce a single private _cleanup_cm contextmanager and use it to implement CleanupTestCase and @cleanup. Use warnings.catch_warnings to avoid completely destroying a preexisting warnings filter,...
X Description: Introduce a single private _cleanup_cm contextmanager and use it to implement CleanupTestCase and @cleanup. Use warnings.catch_warnings to avoid completely destroying a preexisting warnings filter,...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/11292
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:faec0d25-a556-2e8f-85e8-ccb53a7d9c8f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CE52:3F6DDE:20E826:2ECB61:6A57244F |
| html-safe-nonce | dceba17269dd62b55e00e7e96879cbf6e05b6b6b5dce6b3b9bd0dfe089948aea |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTUyOjNGNkRERToyMEU4MjY6MkVDQjYxOjZBNTcyNDRGIiwidmlzaXRvcl9pZCI6IjI0NjIzMzQ1OTgzMDg2MzU3MjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7b889c9e9d11d9c03481253e53c5ebdbb9b0446651e413b7ef08c2123c267455 |
| hovercard-subject-tag | pull_request:189861130 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/11292/files |
| twitter:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| og:image:alt | Introduce a single private _cleanup_cm contextmanager and use it to implement CleanupTestCase and @cleanup. Use warnings.catch_warnings to avoid completely destroying a preexisting warnings filter,... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2576d1f0198cf1588faf2edf27f1ed120903be10 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width