Changeset f53d684 in sasview for test/sascalculator
- Timestamp:
- Dec 5, 2017 12:31:07 PM (7 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)
- Location:
- test/sascalculator/test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
test/sascalculator/test/utest_sas_gen.py
r1d014cb rf53d684 2 2 Unit tests for the sas_gen 3 3 """ 4 5 import os.path 4 6 import warnings 5 7 warnings.simplefilter("ignore") … … 7 9 import unittest 8 10 from sas.sascalc.calculator import sas_gen 11 12 13 def find(filename): 14 return os.path.join(os.path.dirname(__file__), filename) 9 15 10 16 … … 20 26 Test .sld file loaded 21 27 """ 22 f = self.sldloader.read( "sld_file.sld")28 f = self.sldloader.read(find("sld_file.sld")) 23 29 self.assertEqual(f.pos_x[0], -40.5) 24 30 self.assertEqual(f.pos_y[0], -13.5) … … 29 35 Test .pdb file loaded 30 36 """ 31 f = self.pdbloader.read( "c60.pdb")37 f = self.pdbloader.read(find("c60.pdb")) 32 38 self.assertEqual(f.pos_x[0], -0.733) 33 39 self.assertEqual(f.pos_y[0], -1.008) … … 38 44 Test .omf file loaded 39 45 """ 40 f = self.omfloader.read( "A_Raw_Example-1.omf")46 f = self.omfloader.read(find("A_Raw_Example-1.omf")) 41 47 output = sas_gen.OMF2SLD() 42 48 output.set_data(f) -
test/sascalculator/test/utest_slit_length_calculator.py
rb09095a rf53d684 3 3 """ 4 4 5 import os.path 5 6 import unittest 6 7 from sas.sascalc.dataloader.readers.ascii_reader import Reader 7 8 from sas.sascalc.calculator.slit_length_calculator import SlitlengthCalculator \ 8 9 as calculator 10 11 12 def find(filename): 13 return os.path.join(os.path.dirname(__file__), filename) 9 14 10 15 … … 19 24 Test slit_length_calculator" 20 25 """ 21 list = self.reader.read( "beam profile.DAT")26 list = self.reader.read(find("beam profile.DAT")) 22 27 self.assertTrue(len(list) == 1) 23 28 f = list[0]
Note: See TracChangeset
for help on using the changeset viewer.