Line | |
---|
1 | """Automatic verification that the ANUGA code validates against the okushiri |
---|
2 | dataset as expected. See anuga_validation/okushiri_2005 for more details |
---|
3 | """ |
---|
4 | |
---|
5 | import unittest |
---|
6 | import os |
---|
7 | |
---|
8 | import run_dam |
---|
9 | |
---|
10 | class Test_uq(unittest.TestCase): |
---|
11 | def setUp(self): |
---|
12 | pass |
---|
13 | |
---|
14 | |
---|
15 | def tearDown(self): |
---|
16 | # Remove garbage |
---|
17 | for file in os.listdir('.'): |
---|
18 | if file.endswith('.stdout') or\ |
---|
19 | file.endswith('.tsh'): |
---|
20 | os.remove(file) |
---|
21 | |
---|
22 | def test_that_output_is_as_expected(self): |
---|
23 | norm = run_dam.main() |
---|
24 | self.failUnless(norm <= 0.871, |
---|
25 | 'Validation fail.') |
---|
26 | |
---|
27 | |
---|
28 | #------------------------------------------------------------- |
---|
29 | if __name__ == "__main__": |
---|
30 | suite = unittest.makeSuite(Test_uq,'test') |
---|
31 | runner = unittest.TextTestRunner(verbosity=2) |
---|
32 | runner.run(suite) |
---|
Note: See
TracBrowser
for help on using the repository browser.