Changeset 9490
- Timestamp:
- Jan 22, 2015, 4:26:49 PM (10 years ago)
- Location:
- trunk/anuga_core/source/anuga
- Files:
-
- 1 added
- 1 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/file/test/test_read_sww.py
r9488 r9490 11 11 12 12 13 import sww13 import anuga.file.sww as sww 14 14 15 15 … … 25 25 26 26 def tearDown(self): 27 pass 27 for filename in ['read_sww_test0.sww', 'read_sww_test_c0.sww']: 28 try: 29 os.remove(filename) 30 except: 31 pass 28 32 29 33 def test_read_sww(self): … … 39 43 rectangular_cross 40 44 from anuga.shallow_water.shallow_water_domain import Domain 41 from boundariesimport Reflective_boundary45 from anuga import Reflective_boundary 42 46 from anuga.abstract_2d_finite_volumes.generic_boundary_conditions\ 43 47 import Dirichlet_boundary, Time_boundary -
trunk/anuga_core/source/anuga/file/test/test_sww.py
r9488 r9490 5 5 6 6 from anuga.coordinate_transforms.geo_reference import Geo_reference 7 from csv_file import load_csv_as_array, load_csv_as_dict7 from anuga.file.csv_file import load_csv_as_array, load_csv_as_dict 8 8 from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular 9 9 from anuga.shallow_water.shallow_water_domain import Domain 10 from sww import load_sww_as_domain, weed, get_mesh_and_quantities_from_file, \10 from anuga.file.sww import load_sww_as_domain, weed, get_mesh_and_quantities_from_file, \ 11 11 Write_sww 12 12 from anuga.file.netcdf import NetCDFFile … … 29 29 30 30 def tearDown(self): 31 pass 31 for filename in ['test_get_mesh_and_quantities_from_unique_vertices_sww_file.sww', \ 32 'test_get_mesh_and_quantities_from_sww_file.sww']: 33 try: 34 os.remove(filename) 35 except: 36 pass 32 37 33 38 def test_sww2domain1(self): … … 35 40 #Create a test domain, and evolve and save it. 36 41 ################################################ 37 from mesh_factory import rectangular42 #from mesh_factory import rectangular 38 43 39 44 #Create basic mesh … … 186 191 187 192 # Setup 188 from mesh_factory import rectangular193 #from mesh_factory import rectangular 189 194 190 195 # Create basic mesh (100m x 5m) … … 257 262 258 263 # Setup 259 from mesh_factory import rectangular264 #from mesh_factory import rectangular 260 265 261 266 # Create basic mesh (100m x 5m) … … 552 557 if __name__ == "__main__": 553 558 suite = unittest.makeSuite(Test_sww, 'test') 554 runner = unittest.TextTestRunner(verbosity= 2)559 runner = unittest.TextTestRunner(verbosity=1) 555 560 runner.run(suite) -
trunk/anuga_core/source/anuga/file/test/test_ungenerate.py
r9488 r9490 7 7 8 8 from anuga.pmesh.mesh import Vertex, Segment, Mesh 9 from ungenerate import load_ungenerate9 from anuga.file.ungenerate import load_ungenerate 10 10 11 11 class ungenerateTestCase(unittest.TestCase): … … 14 14 15 15 def tearDown(self): 16 pass 16 for filename in ['swamp.tsh']: 17 try: 18 os.remove(filename) 19 except: 20 pass 17 21 18 22 def test_ungenerateFileLoading(self): -
trunk/anuga_core/source/anuga/file/test/test_urs.py
r9488 r9490 1 1 import unittest 2 2 import numpy as num 3 4 from urs import calculate_boundary_points, save_boundary_as_urs 3 import os 4 5 from anuga.file.urs import calculate_boundary_points, save_boundary_as_urs 5 6 from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees 6 7 from anuga.geospatial_data.geospatial_data import Geospatial_data … … 12 13 13 14 def tearDown(self): 14 pass 15 for filename in ['swamp.tsh']: 16 try: 17 os.remove(filename) 18 except: 19 pass 15 20 16 21 def test_URS_points_needed(self): -
trunk/anuga_core/source/anuga/file_conversion/test/test_urs2sts.py
r9476 r9490 29 29 30 30 # Allow us to use helper methods from this test. 31 from anuga.file.test _mux import Test_Mux31 from anuga.file.test.test_mux import Test_Mux 32 32 33 33 class Test_Urs2Sts(Test_Mux): -
trunk/anuga_core/source/anuga/file_conversion/test/test_urs2sww.py
r9478 r9490 26 26 27 27 # use helper methods from other unit test 28 from anuga.file.test _mux import Test_Mux28 from anuga.file.test.test_mux import Test_Mux 29 29 30 30 -
trunk/anuga_core/source/anuga/shallow_water/test/test_data_manager.py
r9457 r9490 21 21 22 22 23 from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular 23 24 from anuga.anuga_exceptions import ANUGAError 24 25 from anuga.file.sww import SWW_file … … 61 62 62 63 # use helper methods from other unit test 63 from anuga.file.test _mux import Test_Mux64 from anuga.file.test.test_mux import Test_Mux 64 65 65 66 … … 73 74 def setUp(self): 74 75 import time 75 from mesh_factory import rectangular76 #from mesh_factory import rectangular 76 77 77 78 self.verbose = Test_Data_Manager.verbose -
trunk/anuga_core/source/anuga/test_all.py
r8819 r9490 110 110 print 111 111 print 'Testing path: %s' % path 112 112 113 common_dir = os.path.dirname(path) 114 common_dir_length = len(common_dir) 115 #print common_dir, common_dir_length 116 113 117 # get the terminal width 114 118 term_width = terminal_width() … … 122 126 # get all test_*.py and enclosing directories 123 127 test_files, path_files = get_test_files(path) 128 #print path_files 124 129 path_files.sort() 125 130 … … 127 132 files.sort() # Ensure same order on all platforms 128 133 134 def my_filter(pathname): 135 136 return pathname[common_dir_length+1:] 137 129 138 print 130 139 print 'Paths searched:' 131 list_names(path_files, os.path.basename, page_width=term_width)140 list_names(path_files, my_filter, page_width=term_width) 132 141 133 142 print -
trunk/anuga_core/source/anuga/utilities/test/test_spatialInputUtil.py
r9435 r9490 11 11 import anuga 12 12 import numpy 13 import os 13 14 from anuga.shallow_water.shallow_water_domain import Domain 14 15 from anuga.utilities import plot_utils as util … … 30 31 31 32 def tearDown(self): 32 pass 33 for file in ['PointData_TestData.tif']: 34 try: 35 os.remove(file) 36 except: 37 pass 33 38 34 39 def make_me_a_tif(self):
Note: See TracChangeset
for help on using the changeset viewer.