Rev | Line | |
---|
[4403] | 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): |
---|
[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 | #------------------------------------------------------------- |
---|
| 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.