[Yt-svn] commit/yt: MatthewTurk: Fixing up the testing of isocontours

Bitbucket commits-noreply at bitbucket.org
Thu Nov 10 08:28:32 PST 2011


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/8517686431a9/
changeset:   8517686431a9
branch:      yt
user:        MatthewTurk
date:        2011-11-10 17:28:11
summary:     Fixing up the testing of isocontours
affected #:  1 file

diff -r f9e18f610a3ff3fa3eb5463277aad44ca6b2a8d4 -r 8517686431a903af3762374306b1991b2106b9df tests/object_field_values.py
--- a/tests/object_field_values.py
+++ b/tests/object_field_values.py
@@ -77,12 +77,16 @@
     def run(self):
         val = self.data_object.quantities["WeightedAverageQuantity"](
             "Density", "Density")
-        triangles = self.data_object.extract_isocontours("Density",
+        rset = self.data_object.extract_isocontours("Density",
             val, rescale = False, sample_values = "Temperature")
-        self.result = triangles
+        self.result = rset
 
     def compare(self, old_result):
-        self.compare_array_delta(self.result, old_result, 1e-7)
+        if self.result[0].size == 0 and old_result[0].size == 0:
+            return True
+        self.compare_array_delta(self.result[0].ravel(),
+                                 old_result[0].ravel(), 1e-7)
+        self.compare_array_delta(self.result[1], old_result[1], 1e-7)
 
 class YTIsocontourFluxTest(YTFieldValuesTest):
     def run(self):

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