source: anuga_validation/automated_validation_tests/pixel_registration/no_validate_pixel_registration.py @ 4820

Last change on this file since 4820 was 4820, checked in by ole, 17 years ago

Addressed ticket:217

File size: 1.1 KB
Line 
1"""Automatic verification that the ANUGA code validates against the example
2   devised by Joquim Luis. See README.txt for more details.
3"""
4
5import unittest
6import os
7
8class Test_Pixel(unittest.TestCase):
9    def setUp(self):
10       
11        # Remove garbage
12        for file in os.listdir('.'):
13
14            # Don't remove br_swan.sww           
15            if file == 'br_swan.sww': continue
16           
17            if file.endswith('.stdout') or\
18               file.endswith('.dem') or\
19               file.endswith('.pts') or\
20               file.endswith('.sww') or\
21               file.endswith('.msh') or\
22               file.endswith('~'):
23                os.remove(file)
24               
25       
26    def tearDown(self):
27        pass
28
29    def test_that_script_can_run_without_errors(self):
30
31        s = 'run_pixel_registration.py'
32        res = os.system('python %s > run_pixel_registration.stdout' %s)
33        assert res == 0
34
35
36
37#-------------------------------------------------------------
38if __name__ == "__main__":
39    suite = unittest.makeSuite(Test_Pixel, 'test')
40    runner = unittest.TextTestRunner(verbosity=2)
41    runner.run(suite)
Note: See TracBrowser for help on using the repository browser.