Changeset 5bb05a4 in sasview for test/sascalculator/test
- Timestamp:
- Dec 6, 2017 11:04:17 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:
- a64f8f4, b6b81a3, 0a88623, 66285f5
- Parents:
- f53d684 (diff), bc4f5bb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Paul Kienzle <pkienzle@…> (12/06/17 11:04:17)
- git-committer:
- GitHub <noreply@…> (12/06/17 11:04:17)
- Location:
- test/sascalculator/test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
test/sascalculator/test/utest_sas_gen.py
rf53d684 r5bb05a4 8 8 9 9 import unittest 10 import numpy as np 11 10 12 from sas.sascalc.calculator import sas_gen 11 13 … … 54 56 self.assertEqual(output.pos_z[0], 0.0) 55 57 58 def test_calculator(self): 59 """ 60 Test that the calculator calculates. 61 """ 62 f = self.omfloader.read("A_Raw_Example-1.omf") 63 omf2sld = sas_gen.OMF2SLD() 64 omf2sld.set_data(f) 65 model = sas_gen.GenSAS() 66 model.set_sld_data(omf2sld.output) 67 x = np.linspace(0, 0.1, 11)[1:] 68 model.runXY([x, x]) 69 56 70 57 71 if __name__ == '__main__': -
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.