[yt-svn] commit/yt: ngoldbaum: Merged in xarthisius/yt (pull request #1974)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Feb 3 09:26:48 PST 2016


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/b75596b39ea8/
Changeset:   b75596b39ea8
Branch:      yt
User:        ngoldbaum
Date:        2016-02-03 17:26:38+00:00
Summary:     Merged in xarthisius/yt (pull request #1974)

Print meaningful error message if image comparison tests fail
Affected #:  1 file

diff -r 9c15ab1e9d7366d52aba8054e9bfb4f2f156d28b -r b75596b39ea8aeb671251a116ce828d8c74c1f88 yt/utilities/answer_testing/framework.py
--- a/yt/utilities/answer_testing/framework.py
+++ b/yt/utilities/answer_testing/framework.py
@@ -681,8 +681,17 @@
     for i in range(num_images):
         mpimg.imsave(fns[0], np.loads(zlib.decompress(old_result[i])))
         mpimg.imsave(fns[1], np.loads(zlib.decompress(new_result[i])))
-        assert compare_images(fns[0], fns[1], 10**(-decimals)) is None
-        for fn in fns: os.remove(fn)
+        results = compare_images(fns[0], fns[1], 10**(-decimals))
+        if results is not None:
+            if os.environ.get("JENKINS_HOME") is not None:
+                tempfiles = [line.strip() for line in results.split('\n')
+                             if line.endswith(".png")]
+                for fn in tempfiles:
+                    sys.stderr.write("\n[[ATTACHMENT|{}]]".format(fn))
+                sys.stderr.write('\n')
+        assert_equal(results, None, results)
+        for fn in fns:
+            os.remove(fn)
 
 class VRImageComparisonTest(AnswerTestingTest):
     _type_name = "VRImageComparison"

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list