Changeset 6dbff18 in sasview for src/sas/qtgui/Perspectives/Fitting/UnitTesting
- Timestamp:
- Sep 3, 2018 10:14:52 AM (6 years ago)
- 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:
- 79bd268
- Parents:
- 8274471e
- git-author:
- Piotr Rozyczko <rozyczko@…> (09/03/18 10:13:50)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (09/03/18 10:14:52)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py
r3f5b901 r6dbff18 420 420 #QtWidgets.QApplication(sys.argv).exec_() 421 421 422 423 422 # Set the checbox 424 423 self.widget._poly_model.item(0,0).setCheckState(2) 425 424 # Assure the parameter is added 426 self.assertEqual(self.widget.p arameters_to_fit, ['radius_bell.width'])425 self.assertEqual(self.widget.poly_params_to_fit, ['radius_bell.width']) 427 426 428 427 # Add another parameter 429 428 self.widget._poly_model.item(2,0).setCheckState(2) 430 429 # Assure the parameters are added 431 self.assertEqual(self.widget.p arameters_to_fit, ['radius_bell.width', 'length.width'])430 self.assertEqual(self.widget.poly_params_to_fit, ['radius_bell.width', 'length.width']) 432 431 433 432 # Change the min/max values … … 683 682 684 683 # Test no fitting params 685 self.widget. parameters_to_fit = []684 self.widget.main_params_to_fit = [] 686 685 687 686 logging.error = MagicMock() … … 709 708 710 709 # Test no fitting params 711 self.widget. parameters_to_fit = []710 self.widget.main_params_to_fit = [] 712 711 713 712 logging.error = MagicMock() … … 735 734 736 735 # Assing fitting params 737 self.widget. parameters_to_fit = ['scale']736 self.widget.main_params_to_fit = ['scale'] 738 737 739 738 # Spying on status update signal … … 748 747 749 748 # the fit button changed caption and got disabled 750 self.assertEqual(self.widget.cmdFit.text(), 'Stop fit') 751 self.assertFalse(self.widget.cmdFit.isEnabled()) 749 # could fail if machine fast enough to finish 750 #self.assertEqual(self.widget.cmdFit.text(), 'Stop fit') 751 #self.assertFalse(self.widget.cmdFit.isEnabled()) 752 752 753 753 # Signal pushed up … … 779 779 780 780 # Assing fitting params 781 self.widget. parameters_to_fit = ['scale']781 self.widget.main_params_to_fit = ['scale'] 782 782 783 783 # Spying on status update signal … … 792 792 793 793 # the fit button changed caption and got disabled 794 self.assertEqual(self.widget.cmdFit.text(), 'Stop fit')795 self.assertFalse(self.widget.cmdFit.isEnabled())794 #self.assertEqual(self.widget.cmdFit.text(), 'Stop fit') 795 #self.assertFalse(self.widget.cmdFit.isEnabled()) 796 796 797 797 # Signal pushed up … … 857 857 category_index = self.widget.cbCategory.findText('Sphere') 858 858 self.widget.cbCategory.setCurrentIndex(category_index) 859 self.widget. parameters_to_fit = ['scale']859 self.widget.main_params_to_fit = ['scale'] 860 860 # Invoke the tested method 861 861 fp = self.widget.currentState() … … 905 905 906 906 # Test no fitting params 907 self.widget. parameters_to_fit = ['scale']907 self.widget.main_params_to_fit = ['scale'] 908 908 909 909 # Invoke the tested method … … 943 943 category_index = self.widget.cbCategory.findText("Sphere") 944 944 self.widget.cbCategory.setCurrentIndex(category_index) 945 self.widget. parameters_to_fit = ['scale']945 self.widget.main_params_to_fit = ['scale'] 946 946 947 947 # Invoke the tested method … … 954 954 self.assertEqual(fp.current_category, "Sphere") 955 955 self.assertEqual(fp.current_model, "adsorbed_layer") 956 self.assertListEqual(fp. parameters_to_fit, ['scale'])956 self.assertListEqual(fp.main_params_to_fit, ['scale']) 957 957 958 958 def testPushFitPage(self): … … 974 974 self.widget.undo_supported = True 975 975 self.widget.cbCategory.setCurrentIndex(category_index) 976 self.widget. parameters_to_fit = ['scale']976 self.widget.main_params_to_fit = ['scale'] 977 977 978 978 # Check that the stack is updated
Note: See TracChangeset
for help on using the changeset viewer.