[yt-svn] commit/yt: 4 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Feb 3 09:26:52 PST 2016
4 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/4305ea147a41/
Changeset: 4305ea147a41
Branch: yt
User: xarthisius
Date: 2016-01-31 18:36:56+00:00
Summary: [tests] Print meaningful error message if image comparison fails
Affected #: 1 file
diff -r 34ed15d98fe48c75d824fbf6246d8ab89c4e2398 -r 4305ea147a414f0866c7b7c1347c9bd467f50ada 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)
+ for fn in fns:
+ os.remove(fn)
class VRImageComparisonTest(AnswerTestingTest):
_type_name = "VRImageComparison"
https://bitbucket.org/yt_analysis/yt/commits/40515f6fd5ff/
Changeset: 40515f6fd5ff
Branch: yt
User: xarthisius
Date: 2016-01-31 18:44:48+00:00
Summary: Fix indent
Affected #: 1 file
diff -r 4305ea147a414f0866c7b7c1347c9bd467f50ada -r 40515f6fd5ff00956f9952f60f471c732d1350cf yt/utilities/answer_testing/framework.py
--- a/yt/utilities/answer_testing/framework.py
+++ b/yt/utilities/answer_testing/framework.py
@@ -689,7 +689,7 @@
for fn in tempfiles:
sys.stderr.write("\n[[ATTACHMENT|{}]]".format(fn))
sys.stderr.write('\n')
- assert_equal(results, None)
+ assert_equal(results, None)
for fn in fns:
os.remove(fn)
https://bitbucket.org/yt_analysis/yt/commits/f46fe3cf3d50/
Changeset: f46fe3cf3d50
Branch: yt
User: xarthisius
Date: 2016-02-01 15:26:16+00:00
Summary: Print 'results' as an error message per Nathan's suggestion
Affected #: 1 file
diff -r 40515f6fd5ff00956f9952f60f471c732d1350cf -r f46fe3cf3d50f944638fa32ac868c7bb283b8d48 yt/utilities/answer_testing/framework.py
--- a/yt/utilities/answer_testing/framework.py
+++ b/yt/utilities/answer_testing/framework.py
@@ -689,7 +689,7 @@
for fn in tempfiles:
sys.stderr.write("\n[[ATTACHMENT|{}]]".format(fn))
sys.stderr.write('\n')
- assert_equal(results, None)
+ assert_equal(results, None, results)
for fn in fns:
os.remove(fn)
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