Changeset f926abb in sasview for test/sascalculator


Ignore:
Timestamp:
Nov 7, 2017 1:21:18 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
7e82256
Parents:
54b0650
Message:

add smoke test for generic scattering calculator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/sascalculator/test/utest_sas_gen.py

    r1d014cb rf926abb  
    66 
    77import unittest 
     8import numpy as np 
     9 
    810from sas.sascalc.calculator import sas_gen 
    911 
     
    4850        self.assertEqual(output.pos_z[0], 0.0) 
    4951 
     52    def test_calculator(self): 
     53        """ 
     54        Test that the calculator calculates. 
     55        """ 
     56        f = self.omfloader.read("A_Raw_Example-1.omf") 
     57        omf2sld = sas_gen.OMF2SLD() 
     58        omf2sld.set_data(f) 
     59        model = sas_gen.GenSAS() 
     60        model.set_sld_data(omf2sld.output) 
     61        x = np.linspace(0, 0.1, 11)[1:] 
     62        model.runXY([x, x]) 
     63 
    5064 
    5165if __name__ == '__main__': 
Note: See TracChangeset for help on using the changeset viewer.