Ignore:
Timestamp:
14/02/08 12:36:06 (12 years ago)
Author:
astephen
Message:

Tidied up _fixHeaderLength in na_file.py.
Changed write interface so self.write(na_dict, delimiter, float_format)
is a separate call to creating the instance.
Fixed unit tests to cope with this.

BUT: broke nappy_api.openNAFile(<file>, "w") with these changes.
Hence need to think about changes being made to openNAFile() so that it
can predict (or not) the FFI.

Only 1001 unit test (worked on by CK) is broken at present.

File:
1 edited

Legend:

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

    r3355 r3414  
    1313 
    1414# Import local modules 
    15 base_dir = os.environ.get("NAPPY_BASE_DIR", "..\\..") 
     15base_dir = os.environ.get("NAPPY_BASE_DIR", "../..") 
    1616sys.path.append(base_dir) 
    1717 
    1818import nappy 
    19 import nappy.na_file.na_file 
     19import nappy.na_file.na_file_1010 
    2020 
    2121class NAFile1010_TestCase(unittest.TestCase): 
     
    3434    def test_write1010(self): 
    3535        "Tests writing FFI 1010." 
    36         self.fobj = nappy.openNAFile(self.outfile, mode="w", na_dict=self.na_dict)               
     36        self.fobj = nappy.na_file.na_file_1010.NAFile1010(self.outfile, mode="w")                
     37        self.fobj.write(na_dict=self.na_dict) 
    3738        self.failUnless(isinstance(self.fobj, nappy.na_file.na_file.NAFile)) 
    3839 
     
    4142    unittest.main() 
    4243 
     44 
Note: See TracChangeset for help on using the changeset viewer.