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
NelleV
left a comment
There was a problem hiding this comment.
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.parametrizeinstead 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
GeneratorExitexception handling insetupfixture of a function. It is workarounded inimage_comparisondecorator, but you will see this line in such case in the log:RuntimeError: generator ignored GeneratorExit