Changeset 6490
- Timestamp:
- Mar 11, 2009, 2:09:05 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py
r6488 r6490 6623 6623 msg = 'Test failed: %s' % str(e) 6624 6624 raise Exception, msg 6625 # Cleanup 6625 finally: 6626 # Cleanup regardless 6626 6627 os.remove(meshname) 6627 os.remove(points_file) 6628 else: 6629 # Cleanup 6630 os.remove(meshname) 6631 os.remove(points_file) 6632 6628 os.remove(points_file) 6633 6629 6634 6630 … … 6636 6632 #FIXME(Ole): Reinstate this when Python2.3 is out of the way 6637 6633 #FIXME(Ole): Python 2.6 apparently introduces something called 'with' 6638 #finally:6639 # # Cleanup regardless6640 # os.remove(meshname)6641 # os.remove(points_file)6642 6634 6643 6635 … … 6679 6671 filename=meshname, 6680 6672 use_cache=False, 6681 verbose= True)6682 6683 domain = Domain(meshname, use_cache=True, verbose= True)6673 verbose=verbose) 6674 6675 domain = Domain(meshname, use_cache=True, verbose=verbose) 6684 6676 6685 6677 # Large test set revealed one problem 6686 domain.set_quantity('elevation', 6687 filename='test_points_large.csv', 6688 use_cache=False, 6689 verbose=True) 6678 points_file = 'test_points_large.csv' 6679 try: 6680 domain.set_quantity('elevation', 6681 filename=points_file, 6682 use_cache=False, 6683 verbose=verbose) 6684 except AssertionError, e: 6685 msg = 'Test failed: %s' % str(e) 6686 raise Exception, msg 6687 # Cleanup in case this failed 6688 os.remove(meshname) 6689 6690 6690 6691 6691 6692 6692 6693 # Small test set revealed another problem 6693 domain.set_quantity('elevation', 6694 filename='test_points_small.csv', 6695 use_cache=False, 6696 verbose=True) 6694 points_file = 'test_points_small.csv' 6695 try: 6696 domain.set_quantity('elevation', 6697 filename=points_file, 6698 use_cache=False, 6699 verbose=verbose) 6700 except AssertionError, e: 6701 msg = 'Test failed: %s' % str(e) 6702 raise Exception, msg 6703 finally: 6704 # Cleanup regardless 6705 os.remove(meshname) 6706 6697 6707 6698 6708 … … 6700 6710 6701 6711 if __name__ == "__main__": 6702 6703 #suite = unittest.makeSuite(Test_Shallow_Water, 'test') 6704 #suite = unittest.makeSuite(Test_Shallow_Water, 'test_rainfall_forcing_with_evolve') 6705 #suite = unittest.makeSuite(Test_Shallow_Water,'test_get_energy_through_cross_section_with_g') 6706 suite = unittest.makeSuite(Test_Shallow_Water,'test_fitting_example_that_crashed_2') 6707 #suite = unittest.makeSuite(Test_Shallow_Water,'test_tight_slope_limiters') 6708 #suite = unittest.makeSuite(Test_Shallow_Water,'test_inflow_outflow_conservation') 6709 #suite = unittest.makeSuite(Test_Shallow_Water,'test_outflow_conservation_problem_temp') 6710 6711 6712 suite = unittest.makeSuite(Test_Shallow_Water, 'test') 6712 6713 6713 6714 runner = unittest.TextTestRunner(verbosity=1)
Note: See TracChangeset
for help on using the changeset viewer.