Changeset f53d684 in sasview for test/sascalculator/test/utest_sas_gen.py
- Timestamp:
- Dec 5, 2017 10:31:07 AM (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 10:31:07)
- git-committer:
- Paul Kienzle <pkienzle@…> (12/05/17 10:31:07)
- File:
-
- 1 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)
Note: See TracChangeset
for help on using the changeset viewer.