Changeset 425feff in sasview
- Timestamp:
- Feb 15, 2018 8:28:55 AM (7 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
- Children:
- 2924532
- Parents:
- 3ee0451
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/file_reader_base_class.py
rc36c09f r425feff 94 94 if not self.f_open.closed: 95 95 self.f_open.close() 96 if any(filepath.lower().endswith(ext) for ext in 97 self.deprecated_extensions): 98 self.handle_error_message(DEPRECATION_MESSAGE) 96 99 if len(self.output) > 0: 97 if any(filepath.lower().endswith(ext) for ext in98 self.deprecated_extensions):99 self.handle_error_message(DEPRECATION_MESSAGE)100 100 # Sort the data that's been loaded 101 101 self.sort_one_d_data() … … 156 156 else: 157 157 logger.warning(msg) 158 raise NoKnownLoaderException(msg) 158 159 159 160 def send_to_output(self): -
test/sasdataloader/test/utest_generic_file_reader_class.py
r3ee0451 r425feff 10 10 from sas.sascalc.dataloader.data_info import DataInfo, plottable_1D 11 11 from sas.sascalc.dataloader.loader import Loader 12 from sas.sascalc.dataloader.loader_exceptions import NoKnownLoaderException 12 13 from sas.sascalc.dataloader.file_reader_base_class import FileReader 13 14 … … 29 30 30 31 def test_bad_file_path(self): 31 output = self.reader.read(self.bad_file)32 self.assertEqual(output, [])32 self.assertRaises(NoKnownLoaderException, self.reader.read, 33 self.bad_file) 33 34 34 35 def test_good_file_path(self):
Note: See TracChangeset
for help on using the changeset viewer.