Changeset f53d684 in sasview for test/sasdataloader/test/utest_sesans.py
- Timestamp:
- Dec 5, 2017 12:31:07 PM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 5bb05a4
- Parents:
- 3053a4a
- git-author:
- Stuart Prescott <llimeht@…> (12/05/17 12:31:07)
- git-committer:
- Paul Kienzle <pkienzle@…> (12/05/17 12:31:07)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/sasdataloader/test/utest_sesans.py
rfe15198 rf53d684 3 3 """ 4 4 5 import os.path 5 6 import unittest 6 7 from sas.sascalc.dataloader.loader_exceptions import FileContentsException,\ … … 8 9 from sas.sascalc.dataloader.readers.sesans_reader import Reader 9 10 from sas.sascalc.dataloader.loader import Loader 11 12 13 def find(filename): 14 return os.path.join(os.path.dirname(__file__), filename) 15 10 16 11 17 class sesans_reader(unittest.TestCase): … … 19 25 Test .SES in the full loader to make sure that the file type is correctly accepted 20 26 """ 21 file = Loader().load( "sesans_examples/sphere2micron.ses")27 file = Loader().load(find("sesans_examples/sphere2micron.ses")) 22 28 f = file[0] 23 29 # self.assertEqual(f, 5) … … 38 44 Test .SES loading on a TOF dataset 39 45 """ 40 file = self.loader( "sesans_examples/sphere_isis.ses")46 file = self.loader(find("sesans_examples/sphere_isis.ses")) 41 47 f = file[0] 42 48 self.assertEqual(len(file), 1) … … 56 62 FileContentsException, 57 63 self.loader, 58 "sesans_examples/sesans_no_data.ses")64 find("sesans_examples/sesans_no_data.ses")) 59 65 60 66 def test_sesans_no_spin_echo_unit(self): … … 65 71 FileContentsException, 66 72 self.loader, 67 "sesans_examples/no_spin_echo_unit.ses")73 find("sesans_examples/no_spin_echo_unit.ses")) 68 74 69 75 def test_sesans_future_version(self): … … 74 80 FileContentsException, 75 81 self.loader, 76 "sesans_examples/next_gen.ses")82 find("sesans_examples/next_gen.ses")) 77 83 78 84 def test_sesans_mandatory_headers(self): … … 83 89 FileContentsException, 84 90 self.loader, 85 "sesans_examples/no_wavelength.ses")91 find("sesans_examples/no_wavelength.ses")) 86 92 87 93 def test_sesans_columns_match_headers(self): … … 92 98 FileContentsException, 93 99 self.loader, 94 "sesans_examples/too_many_headers.ses")100 find("sesans_examples/too_many_headers.ses")) 95 101 96 102 if __name__ == "__main__":
Note: See TracChangeset
for help on using the changeset viewer.