Title: Add a check in check_figures_equal that the test did not accidentally plot on non-fixture figures · Issue #18581 · matplotlib/matplotlib · GitHub
Open Graph Title: Add a check in check_figures_equal that the test did not accidentally plot on non-fixture figures · Issue #18581 · matplotlib/matplotlib
X Title: Add a check in check_figures_equal that the test did not accidentally plot on non-fixture figures · Issue #18581 · matplotlib/matplotlib
Description: Problem check_figures_equal relies on the test plotting onto fig_test and fig_ref, not elsewhere (e.g. on newly instantiated figures, as noticed in #18579). Proposed Solution It should be reasonable to also fail the test if the test func...
Open Graph Description: Problem check_figures_equal relies on the test plotting onto fig_test and fig_ref, not elsewhere (e.g. on newly instantiated figures, as noticed in #18579). Proposed Solution It should be reasonabl...
X Description: Problem check_figures_equal relies on the test plotting onto fig_test and fig_ref, not elsewhere (e.g. on newly instantiated figures, as noticed in #18579). Proposed Solution It should be reasonabl...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/18581
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add a check in check_figures_equal that the test did not accidentally plot on non-fixture figures","articleBody":"\u003c!--\r\nWelcome! Thanks for thinking of a way to improve Matplotlib.\r\n\r\n\r\nBefore creating a new feature request please search the issues for relevant feature requests.\r\n--\u003e\r\n\r\n### Problem\r\n\r\n`check_figures_equal` relies on the test plotting onto `fig_test` and `fig_ref`, not elsewhere (e.g. on newly instantiated figures, as noticed in #18579).\r\n\r\n### Proposed Solution\r\n\r\nIt should be reasonable to also fail the test if the test function creates new pyplot figures to catch errors as in #18579.\r\n\r\n### Additional context and prior art\r\n\r\nInstead, we could also change `check_figures_equal` to just not pass the two figures in and always expect the test function to create exactly two pyplot figures itself and check these, but then it's a bit arbitrary which figure is the reference and which is the test (although that only really (barely) matters for display purposes in triage_tests.py), and feels a bit dirty (even ignoring the API break, which is as always manageable)...","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2020-09-25T22:55:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/18581/matplotlib/issues/18581"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:805d7368-775b-e141-9182-22cc7ad1e173 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E392:17A244:C82D50:10E7935:6A53219E |
| html-safe-nonce | 773c2eb520440e7e991e0d8f86a04261ed55e9fdfe96b41a4bd01e66d2a594a3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzkyOjE3QTI0NDpDODJENTA6MTBFNzkzNTo2QTUzMjE5RSIsInZpc2l0b3JfaWQiOiIzNzg2MDU4MTUxODg5MTUwMzY2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7c41a120de8edf483e7b3ca76fc50038d634b3c0ed285adb9758fbcb1e3d51e7 |
| hovercard-subject-tag | issue:709335185 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/matplotlib/matplotlib/18581/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f172b783019cc2770ddc667b3377b89a4a84f8763aacab26d67e03d5d1e32319/matplotlib/matplotlib/issues/18581 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f172b783019cc2770ddc667b3377b89a4a84f8763aacab26d67e03d5d1e32319/matplotlib/matplotlib/issues/18581 |
| og:image:alt | Problem check_figures_equal relies on the test plotting onto fig_test and fig_ref, not elsewhere (e.g. on newly instantiated figures, as noticed in #18579). Proposed Solution It should be reasonabl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| 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