- Timestamp:
- Apr 16, 2014 1:50:31 PM (11 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- b8de7fb
- Parents:
- d4117ccb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/sansdataloader/test/utest_cansas.py
rea67541 r2e3b055 90 90 self.assertTrue(data.detector[1].distance == 4145.02) 91 91 self.assertTrue(data.process[0].name == "Mantid generated CanSAS1D XML") 92 self.assertTrue(data.meta_data["xmlpreprocess"] ["xml-stylesheet"]!= None)92 self.assertTrue(data.meta_data["xmlpreprocess"] != None) 93 93 94 94 … … 102 102 xmlreader = XMLreader(self.isis_1_1, self.schema_1_1) 103 103 valid = xmlreader.validateXML() 104 xmlreader.setProcessingInstructions() 104 105 self.assertTrue(valid) 106 fo = open(self.isis_1_1) 107 str = fo.read() 105 108 reader_generic = Loader() 106 109 dataloader = reader_generic.load(self.isis_1_1) … … 113 116 self._check_data_1_1(cansasreader[i]) 114 117 reader_generic.save(filename, dataloader[i], None) 115 reader2 = Reader() 116 return_data = reader2.read(filename) 117 data_new = return_data 118 fo = open(filename) 119 str = fo.read() 120 reader2 = Loader() 121 return_data = reader2.load(filename) 118 122 written_data = return_data[0] 119 123 self._check_data(written_data) 120 124 121 125 122 126 def test_double_trans_spectra(self): … … 169 173 self.assertTrue(reader4.validateXML()) 170 174 175 171 176 def test_save_cansas_v1_0(self): 172 177 filename = "isis_1_0_write_test.xml" … … 184 189 reader2 = Reader() 185 190 return_data = reader2.read(filename) 186 data_new = return_data187 191 written_data = return_data[0] 192 xmlwrite = XMLreader(filename, self.schema_1_0) 193 valid = xmlreader.validateXML() 194 self.assertTrue(valid) 188 195 self._check_data(written_data) 189 196 … … 230 237 return dict 231 238 239 232 240 if __name__ == '__main__': 233 241 unittest.main()
Note: See TracChangeset
for help on using the changeset viewer.