source: anuga_validation/automated_validation_tests/okushiri_tank_validation/validate_okushiri.py @ 4555

Last change on this file since 4555 was 3919, checked in by ole, 18 years ago

Automated okushiri validation OK

File size: 1.5 KB
Line 
1"""Automatic verification that the ANUGA code validates against the okushiri
2dataset as expected. See anuga_validation/okushiri_2005 for more details
3"""
4
5import unittest
6import os
7
8
9class Test_Okushiri(unittest.TestCase):
10    def setUp(self):
11
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               
19
20        #print
21        s = 'create_okushiri.py'
22        #print s
23        res = os.system('python %s > create_okushiri.stdout' %s)
24        assert res == 0
25
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#-------------------------------------------------------------
53if __name__ == "__main__":
54    suite = unittest.makeSuite(Test_Okushiri,'test')
55    runner = unittest.TextTestRunner(verbosity=2)
56    runner.run(suite)
Note: See TracBrowser for help on using the repository browser.