Changeset d1c8036 in sasview for park_integration/test/batch_fit.py


Ignore:
Timestamp:
Aug 26, 2011 1:44:43 PM (13 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
2e95da4
Parents:
f3242cf
Message:

update unittest

File:
1 edited

Legend:

Unmodified
Added
Removed
  • park_integration/test/batch_fit.py

    rd48858da rd1c8036  
     1 
    12 
    23import math 
     
    7374            #smear data 
    7475            current_smearer = smear_selection(data, model) 
     76            import cPickle 
     77            p = cPickle.dumps(current_smearer) 
     78            sm = cPickle.loads(p) 
    7579            fitter.set_data(data=data, id=i, 
    7680                             smearer=current_smearer, qmin=self.qmin, qmax=self.qmax) 
     
    107111        path = "latex_qdev2.txt" 
    108112        self._reset_helper(path=path, engine=engine, npts=NPTS) 
     113         
    109114       
    110115    def test_map_fit(self): 
     
    140145    def setUp(self): 
    141146        self.test = BatchScipyFit(qmin=None, qmax=None) 
     147        
    142148     
    143     def test_fit1(self): 
     149    def __test_fit1(self): 
    144150        """test fit with python built in map function---- full range of each data""" 
    145151        self.test.test_map_fit() 
    146152         
    147     #def test_fit2(self): 
    148     #   """test fit with python built in map function---- common range for all data""" 
    149     #    self.test.set_range(qmin=0.013, qmax=0.05) 
    150     #    self.test.reset_value() 
    151     #    self.test.test_map_fit() 
     153    def __test_fit2(self): 
     154        """test fit with python built in map function---- common range for all data""" 
     155        self.test.set_range(qmin=0.013, qmax=0.05) 
     156        self.test.reset_value() 
     157        self.test.test_map_fit() 
    152158         
    153159    def test_fit3(self): 
     
    155161        self.test.set_range(qmin=None, qmax=None) 
    156162        self.test.reset_value() 
     163        self.test.test_process_map_fit(n=2) 
     164         
     165    def test_fit4(self): 
     166        """test fit with a common fixed range for data using 1 processor and map""" 
     167        self.test.set_range(qmin=-1, qmax=10) 
     168        self.test.reset_value() 
    157169        self.test.test_process_map_fit(n=1) 
    158          
    159     #def test_fit4(self): 
    160     #    """test fit with a common fixed range for data using 1 processor and map""" 
    161     #    self.test.set_range(qmin=0.013, qmax=0.05) 
    162     #    self.test.reset_value() 
    163     #    self.test.test_process_map_fit(n=1) 
    164170         
    165171             
Note: See TracChangeset for help on using the changeset viewer.