Commits

Britton Smith committed 114d0e3

Fixing some test imports and function calls.

  • Participants
  • Parent commits 50a61e1

Comments (0)

Files changed (19)

run/Cooling/CoolingTest_Cloudy/test_cooling.py

 from yt.mods import *
 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
-     FieldValuesTest, \
-     requires_outputlog, \
+     AnswerTestingTest, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _fields = ("Cooling_Time",)
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"

run/Cooling/CoolingTest_JHW/test_cooling.py

 from yt.mods import *
 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
-     FieldValuesTest, \
-     requires_outputlog, \
+     AnswerTestingTest, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _fields = ("Cooling_Time",)
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"

run/Cooling/OneZoneFreefallTest/test_freefall.py

      FieldValuesTest, \
      sim_dir_load
 from yt.frontends.enzo.answer_testing_support import \
-    requires_outputlog
+     requires_outputlog
 
 _fields = ("Temperature", "Dust_Temperature")
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"

run/GravitySolver/GravityTest/test_gravity.py

 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
      AnswerTestingTest, \
-     requires_outputlog, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
 _dir_name = os.path.dirname(__file__)

run/GravitySolver/TestOrbit/test_orbit.py

      FieldValuesTest, \
      sim_dir_load
 from yt.frontends.enzo.answer_testing_support import \
-    requires_outputlog
+     requires_outputlog
 
 _fields = ("particle_position_x", "particle_position_y")
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"

run/Hydro/Hydro-1D/FreeExpansion/test_free_expansion.py

 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
      AnswerTestingTest, \
-     requires_outputlog, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
 _dir_name = os.path.dirname(__file__)
 
-class TestFreeExpansionDistance(YTStaticOutputTest):
+class TestFreeExpansionDistance(AnswerTestingTest):
     _type_name = "ExpansionDistance"
     _attrs = ()
 
     
     def run(self):
         ray = self.pf.h.ray([0.0,0.5,0.5], [1.0,0.5,0.5])
-        ray_length = np.sqrt(((q.end_point - q.start_point)**2).sum())
+        ray_length = np.sqrt(((ray.end_point - ray.start_point)**2).sum())
         ipos = na.where(ray['VelocityMagnitude'] == 0.0)[0].argmin()
         return ray_length * ray['t'][ipos]
 

run/Hydro/Hydro-2D/FreeExpansionAMR/test_free_expansion.py

 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
      AnswerTestingTest, \
-     requires_outputlog, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
 _dir_name = os.path.dirname(__file__)
 
-class TestFreeExpansionDistance(YTStaticOutputTest):
+class TestFreeExpansionDistance(AnswerTestingTest):
     _type_name = "ExpansionDistance"
     _attrs = ()
 
     
     def run(self):
         ray = self.pf.h.ray([0.0,0.0,0.5], [1.0,1.0,0.5])
-        ray_length = np.sqrt(((q.end_point - q.start_point)**2).sum())
+        ray_length = np.sqrt(((ray.end_point - ray.start_point)**2).sum())
         ipos = na.where(ray['VelocityMagnitude'] == 0.0)[0].argmin()
         return ray_length * ray['t'][ipos]
 

run/Hydro/Hydro-2D/NohProblem2D/test_noh2d.py

 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
      AnswerTestingTest, \
-     requires_outputlog, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
 _dir_name = os.path.dirname(__file__)

run/Hydro/Hydro-2D/NohProblem2DAMR/test_noh2damr.py

 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
      AnswerTestingTest, \
-     requires_outputlog, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
 _dir_name = os.path.dirname(__file__)

run/Hydro/Hydro-3D/NohProblem3D/test_noh3d.py

 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
      AnswerTestingTest, \
-     requires_outputlog, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
 _dir_name = os.path.dirname(__file__)

run/Hydro/Hydro-3D/NohProblem3DAMR/test_noh3damr.py

 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
      AnswerTestingTest, \
-     requires_outputlog, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
 _dir_name = os.path.dirname(__file__)

run/Hydro/Hydro-3D/RotatingCylinder/test_rotating_cylinder.py

 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
      AnswerTestingTest, \
-     requires_outputlog, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
 _dir_name = os.path.dirname(__file__)

run/MHD/1D/BrioWu-MHD-1D/test_briowu.py

 from yt.frontends.enzo.answer_testing_support import \
     requires_outputlog
 
-_fields = ("By")
+_fields = ("By", )
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
 _dir_name = os.path.dirname(__file__)
 

run/MHD/2D/MHD2DRotorTest/test_rotor.py

 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
      AnswerTestingTest, \
-     requires_outputlog, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
 _dir_name = os.path.dirname(__file__)
     sim.get_time_series()
     for pf in sim:
         for field in _fields:
-            yield TestRotorImage(pf)
+            yield TestRotorImage(pf, field)

run/MHD/2D/SedovBlast-MHD-2D-Fryxell/test_fryxell.py

 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
      AnswerTestingTest, \
-     requires_outputlog, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
 _dir_name = os.path.dirname(__file__)
     sim.get_time_series()
     for pf in sim:
         for field in _fields:
-            yield TestFryxellImage(pf)
+            yield TestFryxellImage(pf, field)

run/MHD/2D/SedovBlast-MHD-2D-Gardiner/test_gardiner.py

 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
      AnswerTestingTest, \
-     requires_outputlog, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
 _dir_name = os.path.dirname(__file__)
     sim.get_time_series()
     for pf in sim:
         for field in _fields:
-            yield TestGardinerImage(pf)
+            yield TestGardinerImage(pf, field)

run/RadiationTransport/PhotonShadowing/test_photonshadowing.py

 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
      AnswerTestingTest, \
-     requires_outputlog, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
 _dir_name = os.path.dirname(__file__)
     sim.get_time_series()
     for pf in sim:
         for field in _fields:
-            yield TestPhotonShadowing(pf)
+            yield TestPhotonShadowing(pf, field)

run/RadiationTransport/PhotonTest/test_photontest.py

 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
      AnswerTestingTest, \
-     requires_outputlog, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
 _dir_name = os.path.dirname(__file__)
     sim.get_time_series()
     for pf in sim:
         for field in _fields:
-            yield TestPhotonTest(pf)
+            yield TestPhotonTest(pf, field)

run/RadiationTransport/PhotonTestAMR/test_amrphotontest.py

 from yt.testing import *
 from yt.utilities.answer_testing.framework import \
      AnswerTestingTest, \
-     requires_outputlog, \
      sim_dir_load
+from yt.frontends.enzo.answer_testing_support import \
+     requires_outputlog
 
 _pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
 _dir_name = os.path.dirname(__file__)
     sim.get_time_series()
     for pf in sim:
         for field in _fields:
-            yield TestAMRPhotonTest(pf)
+            yield TestAMRPhotonTest(pf, field)