Changeset 7248d75d in sasview for src/sas/qtgui/Perspectives


Ignore:
Timestamp:
Mar 20, 2017 9:41:02 AM (8 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
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
Children:
351b53e
Parents:
4d457df
Message:

More unit tests for fitting perspective components - SASVIEW-499

Location:
src/sas/qtgui/Perspectives/Fitting
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingLogic.py

    r4d457df r7248d75d  
    1414    def __init__(self, data=None): 
    1515        self._data = data 
     16        self.data_is_loaded = False 
     17        if data is not None: 
     18            self.data_is_loaded = True 
    1619 
    1720    @property 
     
    119122 
    120123        new_plot.group_id = data.group_id 
    121         if new_plot.group_id == None: 
    122             new_plot.group_id = data.group_id 
    123124        #new_plot.id = str(self.tab_id) + " " + data.name 
    124125        new_plot.name = model.name + " [" + data.name + "]" 
  • src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py

    r4d457df r7248d75d  
    7474    """ 
    7575    for param in parameters.iq_parameters: 
    76         # Modify parameter name from <param>[n] to <param>1 
     76        # Create the top level, checkable item 
    7777        item_name = param.name 
    7878        item1 = QtGui.QStandardItem(item_name) 
  • src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py

    r811bec1 r7248d75d  
    7171        item = QtGui.QStandardItem("test") 
    7272 
    73         widget_with_data = FittingWidget(dummy_manager(), data=[data], id=3) 
     73        widget_with_data = FittingWidget(dummy_manager(), data=[item], id=3) 
    7474 
    7575        self.assertEqual(widget_with_data.data, data) 
    7676        self.assertTrue(widget_with_data.data_is_loaded) 
    77         self.assertTrue(widget_with_data.cmdFit.isEnabled()) 
     77        # self.assertTrue(widget_with_data.cmdFit.isEnabled()) 
    7878        self.assertFalse(widget_with_data.acceptsData()) 
    7979 
     
    125125 
    126126        #Test loading from json categories 
    127         fittingWindow.setModelModel("cylinder") 
     127        fittingWindow.SASModelToQModel("cylinder") 
    128128        pd_index = fittingWindow.lstPoly.model().index(0,0) 
    129129        self.assertEqual(str(pd_index.data().toString()), "Distribution of radius") 
     
    177177        pass 
    178178 
    179     def testGetIterParams(self): 
    180         """ 
    181         Assure the right multishell parameters are returned 
    182         """ 
    183         pass 
    184  
    185     def testGetMultiplicity(self): 
    186         """ 
    187         Assure more multishell parameters are evaluated correctly 
    188         """ 
    189         pass 
    190  
    191     def testAddCheckedListToModel(self): 
    192         """ 
    193         Test for utility function 
    194         """ 
    195         pass 
    196  
    197179    def testUpdateParamsFromModel(self): 
    198180        """ 
     
    207189        pass 
    208190 
    209     def testAddParametersToModel(self): 
    210         """ 
    211         Checks the QModel update from Sasmodel parameters 
    212         """ 
    213         pass 
    214  
    215     def testAddSimpleParametersToModel(self): 
    216         """ 
    217         Checks the QModel update from Sasmodel parameters - no polydisp 
    218         """ 
    219         pass 
    220  
    221191    def testCreateDefault1dData(self): 
    222192        """ 
     
    258228        """ 
    259229        Check that a new 2D plot is generated 
    260         """ 
    261         pass 
    262  
    263     def testReplaceShellName(self): 
    264         """ 
    265         Test the utility function for string manipulation 
    266230        """ 
    267231        pass 
Note: See TracChangeset for help on using the changeset viewer.