Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/sasdataloader/test/utest_generic_file_reader_class.py

    r4a8d55c r282bc3f  
    4545        last_f = f[0] 
    4646        if hasattr(last_f, "errors"): 
    47             self.assertEquals(len(last_f.errors), 1) 
     47            self.assertEqual(len(last_f.errors), 1) 
    4848        else: 
    4949            self.fail("Errors did not propogate to the file properly.") 
     
    5151    def test_same_file_unknown_extensions(self): 
    5252        # Five files, all with the same content, but different file extensions 
    53         no_ext = find("test_data//TestExtensions") 
    54         not_xml = find("test_data//TestExtensions.notxml") 
     53        no_ext = find("test_data" + os.sep + "TestExtensions") 
     54        not_xml = find("test_data" + os.sep + "TestExtensions.notxml") 
    5555        # Deprecated extensions 
    56         asc_dep = find("test_data//TestExtensions.asc") 
    57         nxs_dep = find("test_data//TestExtensions.nxs") 
     56        asc_dep = find("test_data" + os.sep + "TestExtensions.asc") 
     57        nxs_dep = find("test_data" + os.sep + "TestExtensions.nxs") 
    5858        # Native extension as a baseline 
    59         xml_native = find("test_data//TestExtensions.xml") 
     59        xml_native = find("test_data" + os.sep + "TestExtensions.xml") 
    6060        # Load the files and check contents 
    6161        no_ext_load = self.generic_reader.load(no_ext) 
     
    7070        self.check_unknown_extension(xml_load[0]) 
    7171        # Be sure the deprecation warning is passed with the file 
    72         self.assertEquals(len(asc_load[0].errors), 1) 
    73         self.assertEquals(len(nxs_load[0].errors), 1) 
     72        self.assertEqual(len(asc_load[0].errors), 1) 
     73        self.assertEqual(len(nxs_load[0].errors), 0) 
    7474 
    7575    def check_unknown_extension(self, data): 
    7676        self.assertTrue(isinstance(data, Data1D)) 
    77         self.assertEquals(len(data.x), 138) 
    78         self.assertEquals(data.sample.ID, "TK49 c10_SANS") 
    79         self.assertEquals(data.meta_data["loader"], "CanSAS XML 1D") 
     77        self.assertEqual(len(data.x), 138) 
     78        self.assertEqual(data.sample.ID, "TK49 c10_SANS") 
     79        self.assertEqual(data.meta_data["loader"], "CanSAS XML 1D") 
    8080 
    8181    def tearDown(self): 
Note: See TracChangeset for help on using the changeset viewer.