source: anuga_validation/automated_validation_tests/urs_mux_files_validation/validate_Bf.py @ 4842

Last change on this file since 4842 was 4842, checked in by duncan, 16 years ago

working on validation changes

File size: 1.3 KB
RevLine 
[4403]1"""
2Must change
3
4Automatic verification that the ANUGA code validates against the Boundary file
5dataset as expected. See anuga_validation/okushiri_2005 for more details
6"""
7
8import unittest
9import os
10
11
12class Test_Bf(unittest.TestCase):
[4417]13    def setUp(self):
[4403]14
15        # Remove garbage
16        for file in os.listdir('.'):
[4410]17            if file.endswith('.stdout') or\
18               file.endswith('.sww') or\
19               file.endswith('.csv'):
[4403]20                os.remove(file)
21               
22    def tearDown(self):
23        pass
24
25    def test_compare_URSsww_vs_EvolveANUGAsww(self):   
[4417]26       
27        self.setUp()
28       
[4403]29        s = 'run_Bf.py'
30        #print s
31        res = os.system('python %s > compare_timeseries.stdout'\
32                        %s)
33        assert res == 0
[4410]34       
[4417]35        self.cleanUp()
36       
37    def cleanUp(self):
[4403]38
[4410]39        # Remove garbage
[4842]40        # print 'clean up'
[4410]41        for file in os.listdir('.'):
42            if file.endswith('.sww') or\
43               file.endswith('.csv'):
44                os.remove(file)
45               
[4403]46
47
[4410]48
[4403]49#-------------------------------------------------------------
50if __name__ == "__main__":
51    suite = unittest.makeSuite(Test_Bf,'test')
52    runner = unittest.TextTestRunner(verbosity=2)
53    runner.run(suite)
Note: See TracBrowser for help on using the repository browser.