Last change
on this file since 7653 was
7653,
checked in by ole, 13 years ago
|
Started a proper unit test framework for Patong
|
File size:
1.3 KB
|
Line | |
---|
1 | """ |
---|
2 | Must change |
---|
3 | |
---|
4 | Automatic verification that the ANUGA code validates against the Boundary file |
---|
5 | dataset as expected. See anuga_validation/okushiri_2005 for more details |
---|
6 | """ |
---|
7 | |
---|
8 | import unittest |
---|
9 | import os |
---|
10 | |
---|
11 | |
---|
12 | class 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('.csv'): |
---|
20 | os.remove(file) |
---|
21 | |
---|
22 | def tearDown(self): |
---|
23 | pass |
---|
24 | |
---|
25 | def test_compare_URSsww_vs_EvolveANUGAsww(self): |
---|
26 | |
---|
27 | self.setUp() |
---|
28 | |
---|
29 | s = 'run_Bf.py' |
---|
30 | #print s |
---|
31 | res = os.system('python %s > compare_timeseries.stdout'\ |
---|
32 | %s) |
---|
33 | assert res == 0 |
---|
34 | |
---|
35 | self.cleanUp() |
---|
36 | |
---|
37 | def cleanUp(self): |
---|
38 | |
---|
39 | # Remove garbage |
---|
40 | # print 'clean up' |
---|
41 | for file in os.listdir('.'): |
---|
42 | if file.endswith('.sww') or\ |
---|
43 | file.endswith('.csv'): |
---|
44 | os.remove(file) |
---|
45 | |
---|
46 | |
---|
47 | |
---|
48 | |
---|
49 | #------------------------------------------------------------- |
---|
50 | if __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.