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

Last change on this file since 4403 was 4403, checked in by nick, 17 years ago

added Boundary_file test, this compares 2 time series from one location from 2 different sww files. One sww boundary file is created from MUX files and the other is from a simple evolve model which used the MUX sww file as boundary conditions.

This test was created to check URS data

NOTE this is still being developed and is not working yet

File size: 1.6 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):
13    def setUp(self):
14
15        # Remove garbage
16        for file in os.listdir('.'):
17            if file.endswith('.stdout') or\
18#               file.endswith('.sww') or\
19#               file.endswith('.msh'):
20                os.remove(file)
21               
22        '''
23        #print
24        s = 'create_okushiri.py'
25        #print s
26        res = os.system('python %s > create_okushiri.stdout' %s)
27        assert res == 0
28       
29        s = 'run_Bf.py'
30        #print s       
31        res = os.system('python %s > run_Bf.stdout' %s)
32        #must run without error       
33        assert res == 0
34    '''       
35
36    def tearDown(self):
37        pass
38
39    #def test_creation_of_mesh(self):
40    #    s = 'create_okushiri.py'
41    #    os.system('python %s > create_okushiri.stdout' %s)
42
43    #def test_that_simulation_can_run(self):
44    #    s = 'run_okushiri.py'
45    #    os.system('python %s > run_okushiri.stdout' %s)
46
47    def test_compare_URSsww_vs_EvolveANUGAsww(self):   
48        s = 'run_Bf.py'
49        #print s
50        res = os.system('python %s > compare_timeseries.stdout'\
51                        %s)
52        assert res == 0
53
54
55
56#-------------------------------------------------------------
57if __name__ == "__main__":
58    suite = unittest.makeSuite(Test_Bf,'test')
59    runner = unittest.TextTestRunner(verbosity=2)
60    runner.run(suite)
Note: See TracBrowser for help on using the repository browser.