Changeset 9437
- Timestamp:
- Jan 20, 2015, 4:17:32 PM (10 years ago)
- Location:
- trunk/anuga_core/source/anuga
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/geometry/test_polygon.py
r9213 r9437 72 72 73 73 # Form absolute filename and read 74 filename = path + sep + ' mainland_only.csv'74 filename = path + sep + 'data' + sep + 'mainland_only.csv' 75 75 p1 = read_polygon(filename) 76 76 … … 87 87 88 88 # Form absolute filename and read 89 filename = path + sep + ' complex_polygon.csv'89 filename = path + sep + 'data' + sep + 'complex_polygon.csv' 90 90 # Should cause an Exception 91 91 try: … … 105 105 106 106 # Form absolute filename and read 107 filename = path + sep + ' non_complex_polygon.csv'107 filename = path + sep + 'data' + sep + 'non_complex_polygon.csv' 108 108 # Should cause an Exception 109 109 try: … … 120 120 121 121 # Form absolute filename and read 122 filename = path + sep + ' complex_polygon.csv'122 filename = path + sep + 'data' + sep + 'complex_polygon.csv' 123 123 # Should not cause an Exception 124 124 p1 = read_polygon(filename, closed=False) -
trunk/anuga_core/source/anuga/utilities/test/test_cg_solve.py
r9435 r9437 4 4 class TestError(exceptions.Exception): pass 5 5 import unittest 6 7 import os 6 8 7 9 import numpy as num … … 12 14 13 15 class Test_CG_Solve(unittest.TestCase): 16 17 def tearDown(self): 18 try: 19 os.remove('anuga.log') 20 except: 21 pass 14 22 15 23 def test_sparse_solve(self): -
trunk/anuga_core/source/anuga/utilities/test/test_csv_tools.py
r9435 r9437 6 6 import csv 7 7 8 import csv_tools8 import anuga.utilities.csv_tools as csv_tools 9 9 10 10 -
trunk/anuga_core/source/anuga/utilities/test/test_data_audit.py
r9435 r9437 5 5 import os 6 6 7 from data_audit import *7 from anuga.utilities.data_audit import * 8 8 9 9 -
trunk/anuga_core/source/anuga/utilities/test/test_file_utils.py
r9435 r9437 7 7 from anuga.utilities.file_utils import copy_code_files, get_all_swwfiles 8 8 from anuga.utilities.file_utils import del_dir 9 from sww_merge import sww_merge, _sww_merge9 from anuga.utilities.sww_merge import sww_merge, _sww_merge 10 10 11 11 -
trunk/anuga_core/source/anuga/utilities/test/test_log_analyser.py
r9435 r9437 75 75 os.rmdir(dir2) 76 76 os.rmdir(root_dir) 77 os.remove(output_file) 78 #os.remove(log_file_name) 77 79 78 80 -
trunk/anuga_core/source/anuga/utilities/test/test_plot_utils.py
r9435 r9437 36 36 37 37 domain=anuga.create_domain_from_file('test_plot_utils.msh') 38 39 os.remove('test_plot_utils.msh') 38 40 39 41 # 05/05/2014 -- riverwalls only work with DE0 and DE1 … … 251 253 self.basic_tests() 252 254 255 os.remove('test_plot_utils.sww') 256 257 253 258 def test_timeslices(self): 254 259 """ … … 262 267 self.velExtrap_timeSlices_test(ve=True) 263 268 self.velExtrap_timeSlices_test(ve=False) 269 270 os.remove('test_plot_utils.sww') 264 271 265 272 def test_quantity_consistency(self): … … 275 282 l=len(pc.time)-1 276 283 self.quantity_consistency_check(pc,l) 284 285 os.remove('test_plot_utils.sww') 277 286 278 287 … … 319 328 dt_Prd=( (pc.x[nt[0]]-25.)/ll + (pc.y[nt[0]]-10.)*0.5/ll) 320 329 assert(np.allclose(dt_Prd , nt[1])) 330 331 os.remove('test_plot_utils.sww') 321 332 322 333 def test_triangle_areas(self): … … 348 359 len_b = (x2-x0)*vec_01_perp[0] + (y2-y0)*vec_01_perp[1] 349 360 assert(np.allclose(abs(0.5*len_a*len_b),ta[0])) 361 362 os.remove('test_plot_utils.sww') 350 363 351 364 def test_water_volume(self): … … 365 378 wv=util.water_volume(p,pc) 366 379 assert(np.allclose(wVol_2, wv[2])) 380 381 os.remove('test_plot_utils.sww') 367 382 368 383 def test_Make_Geotif(self): -
trunk/anuga_core/source/anuga/utilities/test/test_quantity_setting_functions.py
r9435 r9437 56 56 57 57 domain=anuga.create_domain_from_file('test_quantity_setting_functions.msh') 58 59 os.remove('test_quantity_setting_functions.msh') 58 60 59 61 domain.set_flow_algorithm(flowAlg) … … 236 238 ########################################################################### 237 239 # This example should fail (since the clip_range minimum >= maximum) 238 def should_fail ():240 def should_fail_1(): 239 241 F=qs.composite_quantity_setting_function([[trenchPoly, f0], ['All', 'PointData_ElevTest.tif']],\ 240 242 domain, 241 243 clip_range = [[ -500., -1000.], [-1.0e+100, 1.0e+100]]) 242 244 return 243 self.assertRaises(Exception, lambda: should_fail ())245 self.assertRaises(Exception, lambda: should_fail_1()) 244 246 245 247 return -
trunk/anuga_core/source/anuga/utilities/test/test_sparse.py
r9435 r9437 4 4 from math import sqrt 5 5 6 from sparse import *6 from anuga.utilities.sparse import * 7 7 import numpy as num 8 8 -
trunk/anuga_core/source/anuga/utilities/test/test_system_tools.py
r9435 r9437 129 129 path = '.' + sep 130 130 131 filename = path + sep + 'crc_test_file.png'131 filename = path + sep + '..' + sep + 'data' + sep + 'crc_test_file.png' 132 132 133 133 ref_crc = 1203293305 # Computed on Windows box -
trunk/anuga_core/source/anuga/utilities/test/test_xml_tools.py
r9435 r9437 7 7 import os 8 8 9 from xml_tools import *9 from anuga.utilities.xml_tools import * 10 10 11 11 class Test_xml_tools(unittest.TestCase):
Note: See TracChangeset
for help on using the changeset viewer.