Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Figure equality-based tests.#11408

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 1 commit intomatplotlib:masterfromanntzer:check_figures_equal
Jun 23, 2018

Conversation

anntzer
Copy link
Contributor

Implement acheck_figures_equal decorator, which allows tests where
both the reference and the test image are generated. The idea is to
allow tests of the form "this feature should be equivalent to that
(usually more complex) way of achieving the same thing" without further
bloating the test image directory.

The saved images are properly created in theresult_images folder, but
cannot be "accepted" or "rejected" using the triage_tests UI (as there
is indeed no reference image to be saved in the repo).

Includes an example use case. Other PRs that could use this feature
include#9426 and#11407.

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

@tacaswell
Copy link
Member

I like this!

@tacaswelltacaswell added this to thev3.0 milestoneJun 10, 2018
@jklymak
Copy link
Member

Seems useful. However, the new test is failing 😉

afvincent reacted with laugh emoji

@anntzer
Copy link
ContributorAuthor

Yes, and I can't reproduce the failure locally... Can anyone else give it a try?

@afvincent
Copy link
Contributor

@anntzer I just pulled your PR branch and rantest_axes.py: no failure on my local machine either :/.

Python 3.6.4 (from conda)
Matplotlib master from GitHub (obviously)
Fedora 28

@jklymak
Copy link
Member

yeah, sorry, works on my machine as well (well I skip svg)

@jklymak
Copy link
Member

Interestingly my machine is a mac and it passes on my machine, and this passes the travis Mac tests. But not the linux ones. No idea whats going on here.

Implement a `check_figures_equal` decorator, which allows tests whereboth the reference and the test image are generated.  The idea is toallow tests of the form "this feature should be equivalent to that(usually more complex) way of achieving the same thing" without furtherbloating the test image directory.The saved images are properly created in the `result_images` folder, butcannot be "accepted" or "rejected" using the triage_tests UI (as thereis indeed no reference image to be saved in the repo).Includes an example use case.
@anntzer
Copy link
ContributorAuthor

Almost certain that the failure actually already existed previously on svg and pdf, except that we didn't actually test these two formats (only png) before; moreover that's likely due to old versions of inkscape and gs on travis.
So I just made the test only check the png format.

The new failure on Py3.5 is likely unrelated too.

jklymak reacted with thumbs up emoji

@timhoffmtimhoffm merged commit3a5d8c2 intomatplotlib:masterJun 23, 2018
@anntzeranntzer deleted the check_figures_equal branchJune 23, 2018 17:54
@anntzeranntzer mentioned this pull requestJul 16, 2018
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jklymakjklymakjklymak approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.0.0
Development

Successfully merging this pull request may close these issues.

5 participants
@anntzer@tacaswell@jklymak@afvincent@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp