Changeset 3919
- Timestamp:
- Nov 6, 2006, 3:35:16 PM (18 years ago)
- Location:
- anuga_validation/automated_validation_tests/okushiri_tank_validation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_validation/automated_validation_tests/okushiri_tank_validation/compare_timeseries_with_measures.py
r3917 r3919 21 21 plotting = True 22 22 23 #plotting = False 23 # No plotting for automated unittest (unless one wishes to run 24 # this manually and look at the outputs) 25 plotting = False 26 24 27 25 28 #------------------------- … … 39 42 40 43 41 # Results from lwru2_variable_mesh.sww 44 # Results from lwru2_variable_mesh.sww (aug 2005) 42 45 # 43 46 #Validating Boundary … … 300 303 pass 301 304 302 assert res-eps < expected_covariance[name] <res+eps305 assert res-eps <= expected_covariance[name] <= res+eps 303 306 304 307 … … 320 323 321 324 322 assert res-eps < expected_difference[name] <res+eps325 assert res-eps <= expected_difference[name] <= res+eps 323 326 324 327 # Extrema … … 337 340 pass 338 341 339 assert res-eps < expected_maximum_diff[name] <res+eps342 assert res-eps <= expected_maximum_diff[name] <= res+eps 340 343 341 344 … … 354 357 pass 355 358 356 assert res-eps < expected_minimum_diff[name] <res+eps359 assert res-eps <= expected_minimum_diff[name] <= res+eps 357 360 358 361 … … 374 377 pass 375 378 376 assert res-eps < expected_argmax_timelag[name] <res+eps379 assert res-eps <= expected_argmax_timelag[name] <= res+eps 377 380 378 381 i0 = argmin(observed_timeseries) … … 391 394 pass 392 395 393 assert res-eps < expected_argmin_timelag[name] <res+eps396 assert res-eps <= expected_argmin_timelag[name] <= res+eps 394 397 395 398 -
anuga_validation/automated_validation_tests/okushiri_tank_validation/project.py
r3916 r3919 17 17 18 18 # Model output 19 output_filename = 'okushiri_aut a_validation.sww'19 output_filename = 'okushiri_auto_validation.sww' 20 20 21 21 -
anuga_validation/automated_validation_tests/okushiri_tank_validation/validate_okushiri.py
r3917 r3919 3 3 """ 4 4 5 5 import unittest 6 6 import os 7 7 8 # FIXME: Make into unit test9 8 10 # FIXME: Redirect stdout and stderr 9 class Test_Okushiri(unittest.TestCase): 10 def setUp(self): 11 11 12 s = 'create_okushiri.py' 13 os.system('python %s ' %s) 12 # Remove garbage 13 for file in os.listdir('.'): 14 if file.endswith('.stdout') or\ 15 file.endswith('.sww') or\ 16 file.endswith('.msh'): 17 os.remove(file) 18 14 19 15 s = 'run_okushiri.py' 16 os.system('python %s ' %s) 20 #print 21 s = 'create_okushiri.py' 22 #print s 23 res = os.system('python %s > create_okushiri.stdout' %s) 24 assert res == 0 17 25 18 s = 'compare_timeseries_with_measures.py' 19 os.system('python %s ' %s) 26 s = 'run_okushiri.py' 27 #print s 28 res = os.system('python %s > run_okushiri.stdout' %s) 29 assert res == 0 30 31 32 def tearDown(self): 33 pass 34 35 #def test_creation_of_mesh(self): 36 # s = 'create_okushiri.py' 37 # os.system('python %s > create_okushiri.stdout' %s) 38 39 #def test_that_simulation_can_run(self): 40 # s = 'run_okushiri.py' 41 # os.system('python %s > run_okushiri.stdout' %s) 42 43 def test_that_output_is_as_expected(self): 44 s = 'compare_timeseries_with_measures.py' 45 #print s 46 res = os.system('python %s > compare_timeseries_with_measures.stdout'\ 47 %s) 48 assert res == 0 49 50 51 52 #------------------------------------------------------------- 53 if __name__ == "__main__": 54 suite = unittest.makeSuite(Test_Okushiri,'test') 55 runner = unittest.TextTestRunner(verbosity=2) 56 runner.run(suite)
Note: See TracChangeset
for help on using the changeset viewer.