Ignore:
Timestamp:
Mar 7, 2005, 9:32:07 AM (20 years ago)
Author:
steve
Message:

Cleaned up test function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/test_general_mesh.py

    r1011 r1018  
    99from Numeric import allclose, array, ones, Float
    1010
    11        
    12 class TestCase(unittest.TestCase):
     11
     12class Test_General_Mesh(unittest.TestCase):
    1313    def setUp(self):
    1414        pass
    15        
     15
    1616    def tearDown(self):
    1717        pass
     
    2424        from shallow_water import Domain
    2525        from Numeric import zeros, Float
    26        
     26
    2727        #Create basic mesh
    2828        points, vertices, boundary = rectangular(1, 3)
    2929        domain = Domain(points, vertices, boundary)
    30        
     30
    3131        value = [7]
    3232        indexes = [1]
    33         assert  domain.get_vertices() == domain.triangles 
     33        assert  domain.get_vertices() == domain.triangles
    3434        assert domain.get_vertices([0,4]) == [domain.triangles[0],
    3535                                              domain.triangles[4]]
     
    3838        from shallow_water import Domain
    3939        from Numeric import zeros, Float
    40        
     40
    4141        #Create basic mesh
    4242        points, vertices, boundary = rectangular(1, 3)
    4343        domain = Domain(points, vertices, boundary)
    4444
    45         assert domain.get_area() == 1.0         
     45        assert domain.get_area() == 1.0
    4646
    4747
     
    5353        from shallow_water import Domain
    5454        from Numeric import zeros, Float
    55        
     55
    5656        #Create basic mesh
    5757        points, vertices, boundary = rectangular(1, 3)
    5858        domain = Domain(points, vertices, boundary)
    59        
     59
    6060        assert  domain.get_unique_vertices() == [0,1,2,3,4,5,6,7]
    6161        unique_vertices = domain.get_unique_vertices([0,1,4])
    6262        unique_vertices.sort()
    6363        assert unique_vertices == [0,1,2,4,5,6,7]
    64        
     64
    6565        unique_vertices = domain.get_unique_vertices([0,4])
    6666        unique_vertices.sort()
    6767        assert unique_vertices == [0,2,4,5,6,7]
    68        
     68
    6969#-------------------------------------------------------------
    7070if __name__ == "__main__":
    71     suite = unittest.makeSuite(TestCase,'test')
     71    suite = unittest.makeSuite(Test_General_Mesh,'test')
    7272    runner = unittest.TextTestRunner()
    7373    runner.run(suite)
    7474
    75 
Note: See TracChangeset for help on using the changeset viewer.