-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
image_comparison
decorator refactor
#7097
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
image_comparison
decorator refactor
#7097
Conversation
aabee2a
to
f8efcfc
Compare
How does this relate to https://github.com/matplotlib/pytest-mpl ? |
Currently pytest-mpl does not support multiple extensions and multiple figures/baselines. I have some thoughts about how it should be handled (for example one possibility is to use |
I opened a PR against your branch to fix the scatter issue in a different way. That should have been creating two identical figures, instead it was over-plotting. |
It is now function based, what removes the need of pytest workaround. On pytest it uses `mark.parametrize` instead of a generator, what makes collection phase lightning fast and significantly reduces number of generators usages and corresponding deprecation warnings. (generators are deprecated since pytest 3.0 and will be removed in 4.0) Note: There is a bug in Nose related to `GeneratorExit` exception handling in `setup` fixture of a function. It is workarounded in `image_comparison` decorator, but you will see this line in such case in the log: `RuntimeError: generator ignored GeneratorExit`
Should create two identical figures to exercise data kwarg
af2e816
to
909194b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between the old scatter.png and the new one?
The discussion and diff image is here Kojoley#1 |
I am going to merge this as-is because the failure on appveyor is pgf related and was not caused by this PR. |
It is now function based, what removes the need of pytest workaround. On pytest it uses
mark.parametrize
instead of a generator, what makes collection phase lightning fast and significantly reduces number of generators usages and corresponding deprecation warnings. (generators are deprecated since pytest 3.0 and will be removed in 4.0)Note: There is a bug in Nose related to
GeneratorExit
exception handling insetup
fixture of a function. It is workarounded inimage_comparison
decorator, but you will see this line in such case in the log:RuntimeError: generator ignored GeneratorExit