Changeset 4cbb2f5 in sasview for test/sasdataloader


Ignore:
Timestamp:
Feb 21, 2019 5:23:13 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1249
Children:
1342f6a, dbfd307
Parents:
e4e9162
Message:

pull conflicting changes from master

Location:
test/sasdataloader/test
Files:
2 edited

Legend:

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

    r88d2e70 r4cbb2f5  
    7777 
    7878    def test_usans_negative_dxl(self): 
    79         data_abs = Loader().load(find("sam14_cor.ABS")) 
    80         data_cor = Loader().load(find("sam14_cor.cor")) 
    81         for i in range(0, len(data_abs) - 1): 
     79        data_abs = Loader().load(find("sam14_cor.ABS"))[0] 
     80        data_cor = Loader().load(find("sam14_cor.txt"))[0] 
     81        for i in range(0, len(data_abs.x) - 1): 
    8282            self.assertEqual(data_abs.x[i], data_cor.x[i]) 
    8383            self.assertEqual(data_abs.y[i], data_cor.y[i]) 
    84             self.assertEqual(data_abs.dxl[i], data_cor.dxl[i]) 
    85             self.assertEqual(data_abs.dxw[i], data_cor.dxw[i]) 
    86             self.assertTrue(data_abs.dxl > 0) 
     84            self.assertEqual(data_abs.dxl[i], -data_cor.dx[i]) 
     85            self.assertTrue(data_abs.dxl[i] > 0) 
    8786 
    8887 
     
    118117        self.assertEqual(self.data.detector[0].beam_center.y, center_y) 
    119118 
    120         self.assertEqual(self.data.I_unit, '1/cm') 
     119        self.assertEqual(self.data.I_unit, 'cm^{-1}') 
    121120        self.assertEqual(self.data.data[0], 1.57831) 
    122121        self.assertEqual(self.data.data[1], 2.70983) 
  • test/sasdataloader/test/utest_generic_file_reader_class.py

    r88d2e70 r4cbb2f5  
    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) 
     
    7171        # Be sure the deprecation warning is passed with the file 
    7272        self.assertEqual(len(asc_load[0].errors), 1) 
    73         self.assertEqual(len(nxs_load[0].errors), 1) 
     73        self.assertEqual(len(nxs_load[0].errors), 0) 
    7474 
    7575    def check_unknown_extension(self, data): 
Note: See TracChangeset for help on using the changeset viewer.