Changeset 3529


Ignore:
Timestamp:
26/02/08 23:27:18 (12 years ago)
Author:
astephen
Message:

Added comparison to unit tests and set annotation=False in na_file.py write method.

Location:
nappy/trunk/nappy
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • nappy/trunk/nappy/na_file/na_file.py

    r3521 r3529  
    7676        self.is_open = True 
    7777 
    78     def write(self, delimiter="    ", float_format="%8.3f", annotation = True): 
     78    def write(self, delimiter="    ", float_format="%8.3f", annotation=False): 
    7979        """ 
    8080        Writes an na_dict to the file and then flushes it to ensure data not  
  • nappy/trunk/nappy/unit_tests/test_na_file_1001.py

    r3524 r3529  
    1717 
    1818import nappy 
     19import nappy.utils.compare_na 
    1920 
    2021class NAFile1001_TestCase(unittest.TestCase): 
     
    4445        self.failUnless(isinstance(fobj, nappy.na_file.na_file.NAFile)) 
    4546  
     47    def test_compareFiles1001(self): 
     48        "Tests comparison of written and original files for equivalence." 
     49        res = nappy.utils.compare_na.compNAFiles(self.infile, self.outfile) 
     50        self.assertEqual(res, True) 
     51         
    4652 
    4753if __name__ ==  "__main__": 
  • nappy/trunk/nappy/unit_tests/test_na_file_1010.py

    r3524 r3529  
    1717 
    1818import nappy 
     19import nappy.utils.compare_na 
    1920 
    2021class NAFile1010_TestCase(unittest.TestCase): 
     
    4445        self.failUnless(isinstance(fobj, nappy.na_file.na_file.NAFile)) 
    4546  
     47    def test_compareFiles1010(self): 
     48        "Tests comparison of written and original files for equivalence." 
     49        res = nappy.utils.compare_na.compNAFiles(self.infile, self.outfile) 
     50        self.assertEqual(res, True) 
     51         
    4652 
    4753if __name__ ==  "__main__": 
  • nappy/trunk/nappy/unit_tests/test_na_file_1020.py

    r3524 r3529  
    1717 
    1818import nappy 
     19import nappy.utils.compare_na 
    1920 
    2021class NAFile1020_TestCase(unittest.TestCase): 
     
    4445        self.failUnless(isinstance(fobj, nappy.na_file.na_file.NAFile)) 
    4546  
     47    def test_compareFiles1020(self): 
     48        "Tests comparison of written and original files for equivalence." 
     49        res = nappy.utils.compare_na.compNAFiles(self.infile, self.outfile) 
     50        self.assertEqual(res, True) 
     51         
    4652 
    4753if __name__ ==  "__main__": 
  • nappy/trunk/nappy/unit_tests/test_na_file_2010.py

    r3524 r3529  
    1717 
    1818import nappy 
     19import nappy.utils.compare_na 
    1920 
    2021class NAFile2010_TestCase(unittest.TestCase): 
     
    4445        self.failUnless(isinstance(fobj, nappy.na_file.na_file.NAFile)) 
    4546  
     47    def test_compareFiles2010(self): 
     48        "Tests comparison of written and original files for equivalence." 
     49        res = nappy.utils.compare_na.compNAFiles(self.infile, self.outfile) 
     50        self.assertEqual(res, True) 
     51         
    4652 
    4753if __name__ ==  "__main__": 
  • nappy/trunk/nappy/unit_tests/test_na_file_2110.py

    r3524 r3529  
    1717 
    1818import nappy 
     19import nappy.utils.compare_na 
    1920 
    2021class NAFile2110_TestCase(unittest.TestCase): 
     
    4445        self.failUnless(isinstance(fobj, nappy.na_file.na_file.NAFile)) 
    4546  
     47    def test_compareFiles2110(self): 
     48        "Tests comparison of written and original files for equivalence." 
     49        res = nappy.utils.compare_na.compNAFiles(self.infile, self.outfile) 
     50        self.assertEqual(res, True) 
     51         
    4652 
    4753if __name__ ==  "__main__": 
  • nappy/trunk/nappy/unit_tests/test_na_file_2160.py

    r3524 r3529  
    1717 
    1818import nappy 
     19import nappy.utils.compare_na 
    1920 
    2021class NAFile2160_TestCase(unittest.TestCase): 
     
    4445        self.failUnless(isinstance(fobj, nappy.na_file.na_file.NAFile)) 
    4546  
     47    def test_compareFiles2160(self): 
     48        "Tests comparison of written and original files for equivalence." 
     49        res = nappy.utils.compare_na.compNAFiles(self.infile, self.outfile) 
     50        self.assertEqual(res, True) 
     51         
    4652 
    4753if __name__ ==  "__main__": 
  • nappy/trunk/nappy/unit_tests/test_na_file_2310.py

    r3524 r3529  
    1717 
    1818import nappy 
     19import nappy.utils.compare_na 
    1920 
    2021class NAFile2310_TestCase(unittest.TestCase): 
     
    4445        self.failUnless(isinstance(fobj, nappy.na_file.na_file.NAFile)) 
    4546  
     47    def test_compareFiles2310(self): 
     48        "Tests comparison of written and original files for equivalence." 
     49        res = nappy.utils.compare_na.compNAFiles(self.infile, self.outfile) 
     50        self.assertEqual(res, True) 
     51         
    4652 
    4753if __name__ ==  "__main__": 
  • nappy/trunk/nappy/unit_tests/test_na_file_3010.py

    r3524 r3529  
    1717 
    1818import nappy 
     19import nappy.utils.compare_na 
    1920 
    2021class NAFile3010_TestCase(unittest.TestCase): 
     
    4445        self.failUnless(isinstance(fobj, nappy.na_file.na_file.NAFile)) 
    4546  
     47    def test_compareFiles3010(self): 
     48        "Tests comparison of written and original files for equivalence." 
     49        res = nappy.utils.compare_na.compNAFiles(self.infile, self.outfile) 
     50        self.assertEqual(res, True) 
     51         
    4652 
    4753if __name__ ==  "__main__": 
  • nappy/trunk/nappy/unit_tests/test_na_file_4010.py

    r3524 r3529  
    1717 
    1818import nappy 
     19import nappy.utils.compare_na 
    1920 
    2021class NAFile4010_TestCase(unittest.TestCase): 
     
    4445        self.failUnless(isinstance(fobj, nappy.na_file.na_file.NAFile)) 
    4546  
     47    def test_compareFiles4010(self): 
     48        "Tests comparison of written and original files for equivalence." 
     49        res = nappy.utils.compare_na.compNAFiles(self.infile, self.outfile) 
     50        self.assertEqual(res, True) 
     51         
    4652 
    4753if __name__ ==  "__main__": 
  • nappy/trunk/nappy/unit_tests/test_na_file_template.txt

    r3524 r3529  
    1717 
    1818import nappy 
     19import nappy.utils.compare_na 
    1920 
    2021class NAFile<FFI>_TestCase(unittest.TestCase): 
     
    4445        self.failUnless(isinstance(fobj, nappy.na_file.na_file.NAFile)) 
    4546  
     47    def test_compareFiles<FFI>(self): 
     48        "Tests comparison of written and original files for equivalence." 
     49        res = nappy.utils.compare_na.compNAFiles(self.infile, self.outfile) 
     50        self.assertEqual(res, True) 
     51         
    4652 
    4753if __name__ ==  "__main__": 
Note: See TracChangeset for help on using the changeset viewer.