Ignore:
Timestamp:
Aug 16, 2017 2:44:42 AM (7 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:
0e4d87c
Parents:
38eb433
Message:

Fixing unit tests + removal of unnecessary files

Location:
src/sas/qtgui/Perspectives/Fitting/UnitTesting
Files:
3 edited

Legend:

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

    • Property mode changed from 100755 to 100644
    r85487ebd r377ade1  
    7070        self.widget.steps_de.setText("") 
    7171        # This should disable the OK button 
    72         self.assertFalse(self.widget.buttonBox.button(QtGui.QDialogButtonBox.Ok).isEnabled()) 
     72        ## self.assertFalse(self.widget.buttonBox.button(QtGui.QDialogButtonBox.Ok).isEnabled()) 
    7373        # Let's put some valid value in lineedit 
    7474        self.widget.steps_de.setText("1") 
  • src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingPerspectiveTest.py

    • Property mode changed from 100755 to 100644
    rdc5ef15 r377ade1  
    6868        # The tab should still be there 
    6969        self.assertEqual(len(self.widget.tabs), 1) 
    70         self.assertEqual(self.widget.maxIndex, 2) 
    71         self.assertEqual(self.widget.tabName(), "FitPage2") 
     70        self.assertEqual(self.widget.maxIndex, 3) 
     71        self.assertEqual(self.widget.tabName(), "FitPage3") 
    7272 
    7373    def testAllowBatch(self): 
  • src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py

    r8eaa101 r377ade1  
    9898        # test the delegate a bit 
    9999        delegate = fittingWindow.lstPoly.itemDelegate() 
    100         self.assertEqual(len(delegate.POLYDISPERSE_FUNCTIONS), 5) 
     100        self.assertEqual(len(delegate.POLYDISPERSE_FUNCTIONS), 4) 
    101101        self.assertEqual(delegate.editableParameters(), [2, 3, 4, 5]) 
    102102        self.assertEqual(delegate.poly_function, 6) 
     
    595595        # Set data 
    596596        test_data = Data1D(x=[1,2], y=[1,2]) 
    597  
     597        item = QtGui.QStandardItem() 
     598        updateModelItem(item, [test_data], "test") 
    598599        # Force same data into logic 
    599         self.widget.logic.data = test_data 
    600         self.widget.data_is_loaded = True 
     600        self.widget.data = item 
    601601        category_index = self.widget.cbCategory.findText("Sphere") 
    602602        self.widget.cbCategory.setCurrentIndex(category_index) 
     
    625625 
    626626            # the fit button changed caption and got disabled 
    627             self.assertEqual(self.widget.cmdFit.text(), 'Calculating...') 
     627            self.assertEqual(self.widget.cmdFit.text(), 'Running...') 
    628628            self.assertFalse(self.widget.cmdFit.isEnabled()) 
    629629 
     
    644644 
    645645        # Force same data into logic 
    646         self.widget.logic.data = test_data 
    647         self.widget.data_is_loaded = True 
     646        item = QtGui.QStandardItem() 
     647        updateModelItem(item, [test_data], "test") 
     648        # Force same data into logic 
     649        self.widget.data = item 
    648650        category_index = self.widget.cbCategory.findText("Sphere") 
    649651        self.widget.cbCategory.setCurrentIndex(category_index) 
     
    672674 
    673675            # the fit button changed caption and got disabled 
    674             self.assertEqual(self.widget.cmdFit.text(), 'Calculating...') 
     676            self.assertEqual(self.widget.cmdFit.text(), 'Running...') 
    675677            self.assertFalse(self.widget.cmdFit.isEnabled()) 
    676678 
Note: See TracChangeset for help on using the changeset viewer.