Title: Avoid using pyplot for check_figures_equal by ayshih · Pull Request #31076 · matplotlib/matplotlib · GitHub
Open Graph Title: Avoid using pyplot for check_figures_equal by ayshih · Pull Request #31076 · matplotlib/matplotlib
X Title: Avoid using pyplot for check_figures_equal by ayshih · Pull Request #31076 · matplotlib/matplotlib
Description: PR summary The @check_figures_equal testing decorator currently uses pyplot to create the two figures, but the use of pyplot means that a wrapped test is automatically not thread-safe, even when the test itself does not need any pyplot functionality. This PR changes the testing decorator to create the two Figure instances directly, which means that such tests will not immediately fail when testing for thread safety (e.g., using pytest-run-parallel). I also removed the check for whether any new pyplot figures are created during the test because that is also not thread-safe. PR checklist [N/A] "closes #0000" is in the body of the PR description to link the related issue [N/A] new and changed code is tested [N/A] Plotting related features are demonstrated in an example [N/A] New Features and API Changes are noted with a directive and release note [N/A] Documentation complies with general and docstring guidelines
Open Graph Description: PR summary The @check_figures_equal testing decorator currently uses pyplot to create the two figures, but the use of pyplot means that a wrapped test is automatically not thread-safe, even when t...
X Description: PR summary The @check_figures_equal testing decorator currently uses pyplot to create the two figures, but the use of pyplot means that a wrapped test is automatically not thread-safe, even when t...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/31076
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:81fc73fa-c4de-bd3f-a4c6-20e039c48efe |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E3C4:32425C:43A4A3:5B4D82:6A5409DF |
| html-safe-nonce | 39c2db4b7f9c2655e0b67d89a00aabdccd7152bcddb2e18ef7208d791d95b83f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0M0OjMyNDI1Qzo0M0E0QTM6NUI0RDgyOjZBNTQwOURGIiwidmlzaXRvcl9pZCI6IjQyODk5NjQyNDkyOTQ1NzE5OTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 419a19f700ecd5c14a99aa1c5e74067ca1bca2d26ed0f2d5c557c747ffb680ff |
| hovercard-subject-tag | pull_request:3246180939 |
| 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/31076/files |
| twitter:image | https://avatars.githubusercontent.com/u/991759?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/991759?s=400&v=4 |
| og:image:alt | PR summary The @check_figures_equal testing decorator currently uses pyplot to create the two figures, but the use of pyplot means that a wrapped test is automatically not thread-safe, even when t... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width