Ignore:
Timestamp:
Jan 20, 2006, 5:05:41 PM (19 years ago)
Author:
ole
Message:

Work towards a test_all.py at the inundation directory level. Most tests pass except a few in least_squares, data_manager and cg_solve...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/test_most2nc.py

    r1123 r2263  
    33import most2nc
    44from Scientific.IO.NetCDF import NetCDFFile
     5import os
     6
     7FN = 'small___.txt'
    58
    69class Test_most2nc(unittest.TestCase):
    710    def setUp(self):
    8         pass
    9 
     11        fid = open(FN, 'w')
     12        fid.write("""4 4
     13150.66667
     14150.83334
     15151.
     16151.16667
     17-34.
     18-34.16667
     19-34.33333
     20-34.5
     21-1. -2. -3. -4.
     22-5. -6. -7. -8.
     23-9. -10. -11. -12.
     24-13. -14. -15. -16.
     25""")
     26        fid.close()
     27                 
    1028    def tearDown(self):
    11         pass
     29        os.remove(FN)
    1230
    1331    def test_small_nxn(self):
    14         most2nc.most2nc(input_file='small.txt',output_file='test.nc'\
     32        most2nc.most2nc(input_file=FN,output_file='test.nc'\
    1533                        ,inverted_bathymetry = False,verbose = False)
    1634
     
    2947        os.remove('test.nc')
    3048       
     49if __name__ == "__main__":
     50    suite = unittest.makeSuite(Test_most2nc,'test')
     51    runner = unittest.TextTestRunner()
     52    runner.run(suite)
Note: See TracChangeset for help on using the changeset viewer.