Changeset 4cbb2f5 in sasview for test/sasdataloader
- Timestamp:
- Feb 21, 2019 5:23:13 PM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1249
- Children:
- 1342f6a, dbfd307
- Parents:
- e4e9162
- Location:
- test/sasdataloader/test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
test/sasdataloader/test/utest_abs_reader.py
r88d2e70 r4cbb2f5 77 77 78 78 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): 82 82 self.assertEqual(data_abs.x[i], data_cor.x[i]) 83 83 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) 87 86 88 87 … … 118 117 self.assertEqual(self.data.detector[0].beam_center.y, center_y) 119 118 120 self.assertEqual(self.data.I_unit, ' 1/cm')119 self.assertEqual(self.data.I_unit, 'cm^{-1}') 121 120 self.assertEqual(self.data.data[0], 1.57831) 122 121 self.assertEqual(self.data.data[1], 2.70983) -
test/sasdataloader/test/utest_generic_file_reader_class.py
r88d2e70 r4cbb2f5 51 51 def test_same_file_unknown_extensions(self): 52 52 # 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") 55 55 # 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") 58 58 # Native extension as a baseline 59 xml_native = find("test_data //TestExtensions.xml")59 xml_native = find("test_data" + os.sep + "TestExtensions.xml") 60 60 # Load the files and check contents 61 61 no_ext_load = self.generic_reader.load(no_ext) … … 71 71 # Be sure the deprecation warning is passed with the file 72 72 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) 74 74 75 75 def check_unknown_extension(self, data):
Note: See TracChangeset
for help on using the changeset viewer.