Commits

Matthew Turk committed 1fe4ad4

Added an 'all data' field value test.

  • Participants
  • Parent commits 51250f4

Comments (0)

Files changed (2)

File fields_to_test.py

                   # Ghost zones
                   "AveragedDensity", "DivV"]
 
+particle_field_list = ["particle_position_x", "ParticleMassMsun"]

File object_field_values.py

 from yt.utilities.answer_testing.output_tests import \
     YTStaticOutputTest, RegressionTestException, create_test
 from yt.funcs import ensure_list
-from fields_to_test import field_list
+from fields_to_test import field_list, particle_field_list
 
 class FieldHashesDontMatch(RegressionTestException):
     pass
         width = (self.pf.domain_right_edge - self.pf.domain_left_edge).max()
         self.data_object = self.pf.h.sphere(center, width/0.25)
 
-for field in field_list:
+for field in field_list + particle_field_list:
     create_test(CenteredSphere, "centered_sphere_%s" % (field), field = field)
 
 class OffCenteredSphere(YTFieldValuesTest):
         width = (self.pf.domain_right_edge - self.pf.domain_left_edge).max()
         self.data_object = self.pf.h.sphere(center - 0.25 * width, width/0.25)
 
-for field in field_list:
+for field in field_list + particle_field_list:
     create_test(OffCenteredSphere, "off_centered_sphere_%s" % (field), field = field)
 
 class CornerSphere(YTFieldValuesTest):
         width = (self.pf.domain_right_edge - self.pf.domain_left_edge).max()
         self.data_object = self.pf.h.sphere(self.pf.domain_left_edge, width/0.25)
 
-for field in field_list:
+for field in field_list + particle_field_list:
     create_test(CornerSphere, "corner_sphere_%s" % (field), field = field)
 
+class AllData(YTFieldValuesTest):
+    def setup(self):
+        YTFieldValuesTest.setup(self)
+        self.data_object = self.pf.h.all_data()
 
+for field in field_list + particle_field_list:
+    create_test(AllData, "all_data_%s" % (field), field = field)