Changeset 4390


Ignore:
Timestamp:
Apr 18, 2007, 10:09:52 AM (17 years ago)
Author:
duncan
Message:

adding a test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/coordinate_transforms/test_geo_reference.py

    r4184 r4390  
    5252
    5353        self.failUnless(g == new_g, 'test_read_write_NetCDF failed') 
     54       
     55    def test_read_write_NetCDFII(self):
     56        from Scientific.IO.NetCDF import NetCDFFile
     57        g = Geo_reference(56,1.9,1.9)
     58        file_name = tempfile.mktemp(".geo_referenceTest")
     59       
     60        outfile = NetCDFFile(file_name, 'w')
     61        outfile.xllcorner = g.get_xllcorner()
     62        outfile.yllcorner =  g.get_yllcorner()
     63        outfile.zone = g.get_zone()
     64        outfile.close()
     65       
     66        in_file = NetCDFFile(file_name, 'r')
     67        new_g = Geo_reference(NetCDFObject=in_file)
     68        in_file.close()
     69        os.remove(file_name)
     70
     71        self.failUnless(g == new_g, ' failed')
    5472       
    5573    def test_read_write_ASCII(self):
Note: See TracChangeset for help on using the changeset viewer.