Ignore:
Timestamp:
Jul 26, 2018 3:30:15 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
dc71408
Parents:
e793f62
git-author:
Piotr Rozyczko <rozyczko@…> (07/26/18 03:28:51)
git-committer:
Piotr Rozyczko <rozyczko@…> (07/26/18 03:30:15)
Message:

new unit test runner script + test fixes. SASVIEW-970

File:
1 edited

Legend:

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

    re793f62 r144fe21  
    411411        category_index = self.widget.cbCategory.findText("Cylinder") 
    412412        self.widget.cbCategory.setCurrentIndex(category_index) 
     413        model_index = self.widget.cbModel.findText("barbell") 
     414        self.widget.cbModel.setCurrentIndex(model_index) 
    413415 
    414416        # click on a poly parameter checkbox 
    415417        index = self.widget._poly_model.index(0,0) 
     418 
     419        #self.widget.show() 
     420        #QtWidgets.QApplication(sys.argv).exec_() 
     421 
     422 
    416423        # Set the checbox 
    417424        self.widget._poly_model.item(0,0).setCheckState(2) 
     
    455462        category_index = self.widget.cbCategory.findText("Cylinder") 
    456463        self.widget.cbCategory.setCurrentIndex(category_index) 
     464        model_index = self.widget.cbModel.findText("barbell") 
     465        self.widget.cbModel.setCurrentIndex(model_index) 
    457466 
    458467        # call method with default settings 
     
    494503        category_index = self.widget.cbCategory.findText("Cylinder") 
    495504        self.widget.cbCategory.setCurrentIndex(category_index) 
     505        model_index = self.widget.cbModel.findText("barbell") 
     506        self.widget.cbModel.setCurrentIndex(model_index) 
    496507 
    497508        self.widget.onPolyComboIndexChange('array', 0) 
     
    524535 
    525536        # Check the magnetic model 
    526         self.assertEqual(self.widget._magnet_model.rowCount(), 9) 
     537        self.assertEqual(self.widget._magnet_model.rowCount(), 12) 
    527538        self.assertEqual(self.widget._magnet_model.columnCount(), 5) 
    528539 
     
    535546 
    536547        header_tooltips = ['Select parameter for fitting', 
    537                              'Enter parameter value', 
    538                              'Enter minimum value for parameter', 
    539                              'Enter maximum value for parameter', 
    540                              'Unit of the parameter'] 
     548                           'Enter parameter value', 
     549                           'Enter minimum value for parameter', 
     550                           'Enter maximum value for parameter', 
     551                           'Unit of the parameter'] 
    541552        for column, tooltip in enumerate(header_tooltips): 
    542553             self.assertEqual(self.widget._magnet_model.headerData(column, 
     
    942953        self.assertTrue(fp.data_is_loaded) 
    943954        self.assertEqual(fp.current_category, "Sphere") 
    944         self.assertEqual(fp.current_model, "adsorbed_layer") 
     955        self.assertEqual(fp.current_model, "binary_hard_sphere") 
    945956        self.assertListEqual(fp.parameters_to_fit, ['scale']) 
    946957 
Note: See TracChangeset for help on using the changeset viewer.