Simplify/pathlibify image_comparison.#14338
Merged
jklymak merged 1 commit intomatplotlib:masterfrom Jul 18, 2019
Merged
Conversation
anntzer
commented
May 26, 2019
| err = compare_images(expected, actual, tol, in_decorator=True) | ||
|
|
||
| if not os.path.exists(expected): | ||
| raise ImageComparisonFailure('image does not exist: %s' % expected) |
Contributor
Author
There was a problem hiding this comment.
the same check is already done in compare_images, just above.
timhoffm
reviewed
May 27, 2019
Member
timhoffm
left a comment
There was a problem hiding this comment.
Basically looks good. I don't oversee this completely, does this return Paths instead of str in a place that could be public API? If so, we have to be careful about API changes.
Contributor
Author
|
Since #14244 there's no public use of _ImageComparisonBase anymore (previously it had a public subclass for nosetests support). |
timhoffm
approved these changes
May 27, 2019
795176d to
1a48953
Compare
There's no public class that inherits from _ImageComparisonBase anymore, so we can improve it by getting rid of the delayed_init mechanism and by pathlibifying its internals without worrying about API breaks. The changes in compare.py are necessary to make these functions also support Path (now passed by _ImageComparisonBase) as arguments.
1a48953 to
09bd5dd
Compare
6 tasks
dstansby
approved these changes
Jul 18, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There's no public class that inherits from _ImageComparisonBase anymore,
so we can improve it by getting rid of the delayed_init mechanism and by
pathlibifying its internals without worrying about API breaks.
The changes in compare.py are necessary to make these functions also
support Path (now passed by _ImageComparisonBase) as arguments.
Preliminary to the PR mentioned in #14329 (comment).
PR Summary
PR Checklist