Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

@mdbooms suggestion for handling missing result files.

  • Loading branch information...
commit 8952dee3f4bf8113bb6ea95387ba3b4d863c9f8d 1 parent da88271
@pelson authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/matplotlib/testing/compare.py
View
7 lib/matplotlib/testing/compare.py
@@ -296,13 +296,14 @@ def compare_images( expected, actual, tol, in_decorator=False ):
# Convert the image to png
extension = expected.split('.')[-1]
- if extension != 'png':
- actual = convert(actual, False)
- expected = convert(expected, True)
if not os.path.exists(expected):
raise IOError('Baseline image %r does not exist.' % expected)
+ if extension != 'png':
+ actual = convert(actual, False)
+ expected = convert(expected, True)
+
# open the image files and remove the alpha channel (if it exists)
expectedImage = _png.read_png_int( expected )
actualImage = _png.read_png_int( actual )
Please sign in to comment.
Something went wrong with that request. Please try again.