/[escript]/trunk/pyvisi/test/python/run_map.py
ViewVC logotype

Diff of /trunk/pyvisi/test/python/run_map.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1210 by jongui, Wed Jun 20 05:01:30 2007 UTC revision 1211 by jongui, Wed Jul 4 05:16:46 2007 UTC
# Line 19  PYVISI_TEST_MAP_IMAGES_PATH = os.path.jo Line 19  PYVISI_TEST_MAP_IMAGES_PATH = os.path.jo
19  MIN_IMAGE_SIZE = 100  MIN_IMAGE_SIZE = 100
20  FILE_2D = "interior_2D.xml"  FILE_2D = "interior_2D.xml"
21  FILE_3D = "interior_3D.xml"  FILE_3D = "interior_3D.xml"
22    FILE_2D_ROTATION = "without_st.0700.xml"
23  FILE_SECOND_ORDER_3D = "temp-000585.vtu"  FILE_SECOND_ORDER_3D = "temp-000585.vtu"
24  X_SIZE = 400  X_SIZE = 400
25  Y_SIZE = 400  Y_SIZE = 400
# Line 384  class TestMapOnScalarClip(unittest.TestC Line 385  class TestMapOnScalarClip(unittest.TestC
385  ###############################################################################  ###############################################################################
386    
387    
388    from esys.pyvisi import MapOnScalarClipWithRotation
389    
390    class TestMapOnScalarClipWithRotation(unittest.TestCase, TestMap):
391        def setUp(self):
392            self.scene = \
393                    Scene(renderer = JPG_RENDERER, num_viewport = 1,
394                    x_size = X_SIZE, y_size = Y_SIZE)
395        
396            self.data_collector = DataCollector(source = Source.XML)
397            self.data_collector.setFileName(file_name = \
398                    os.path.join(PYVISI_TEST_MESHES_PATH, FILE_2D_ROTATION))
399            
400            self.map = MapOnScalarClipWithRotation(scene = self.scene,
401                    data_collector = self.data_collector,
402                    viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR,
403                    cell_to_point = False)
404    
405        def tearDown(self):
406            del self.scene
407            del self.data_collector
408            del self.map
409    
410        def testSetAngle(self):
411            self.map.setAngle(200)
412            self.render("TestMapOnScalarClipWithRotation_testSetAngle.jpg")
413    
414    
415    ###############################################################################
416    
417    
418  if __name__ == '__main__':  if __name__ == '__main__':
419      suite = unittest.TestSuite()      suite = unittest.TestSuite()
420      suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOneViewport))      suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOneViewport))
# Line 397  if __name__ == '__main__': Line 428  if __name__ == '__main__':
428      suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOnPlaneCut))      suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOnPlaneCut))
429      suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOnPlaneClip))      suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOnPlaneClip))
430      suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOnScalarClip))      suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOnScalarClip))
431        suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOnScalarClipWithRotation))
432      suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMap3DSecondOrder))      suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMap3DSecondOrder))
433      unittest.TextTestRunner(verbosity=2).run(suite)      unittest.TextTestRunner(verbosity=2).run(suite)
434    

Legend:
Removed from v.1210  
changed lines
  Added in v.1211

  ViewVC Help
Powered by ViewVC 1.1.26