Ignore:
Timestamp:
26/02/08 19:36:35 (12 years ago)
Author:
astephen
Message:

Fixed, renewed and added tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nappy/trunk/nappy/unit_tests/test_na_file_2110.py

    r3425 r3524  
    2323        self.infile = os.path.join(base_dir, "data_files", "2110.na") 
    2424        self.outfile = os.path.join(base_dir, "test_outputs", "test_2110.na") 
     25        self.out_csv = os.path.join(base_dir, "test_outputs", "test_2110.csv") 
    2526        self.fin = nappy.openNAFile(self.infile) 
    2627        self.fin.readData() 
     
    3334    def test_write2110(self): 
    3435        "Tests writing FFI 2110." 
    35         self.fobj = nappy.openNAFile(self.outfile, mode="w", na_dict=self.na_dict)               
    36         self.fobj.write() 
    37         self.failUnless(isinstance(self.fobj, nappy.na_file.na_file.NAFile)) 
     36        fobj = nappy.openNAFile(self.outfile, mode="w", na_dict=self.na_dict)            
     37        fobj.write() 
     38        self.failUnless(isinstance(fobj, nappy.na_file.na_file.NAFile)) 
     39 
     40    def test_writeAnnotatedCSV2110(self): 
     41        "Tests conversion to NetCDF." 
     42        fobj = nappy.openNAFile(self.out_csv, mode="w", na_dict=self.na_dict) 
     43        fobj.write(delimiter=",", float_format="%.2d", annotation=True) 
     44        self.failUnless(isinstance(fobj, nappy.na_file.na_file.NAFile)) 
     45  
    3846 
    3947if __name__ ==  "__main__": 
Note: See TracChangeset for help on using the changeset viewer.