Changeset 676f137 in sasview for src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingPerspectiveTest.py
- Timestamp:
- Jan 11, 2018 8:04:58 AM (7 years ago)
- 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:
- be8f4b0
- Parents:
- 570e091
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingPerspectiveTest.py
r53c771e r676f137 44 44 self.assertEqual(len(self.widget.tabs), 1) 45 45 self.assertEqual(self.widget.maxIndex, 1) 46 self.assertEqual(self.widget.tabName(), "FitPage1") 46 self.assertEqual(self.widget.maxCSIndex, 0) 47 self.assertEqual(self.widget.getTabName(), "FitPage1") 47 48 48 49 def testAddTab(self): … … 52 53 self.widget.addFit(None) 53 54 self.assertEqual(len(self.widget.tabs), 2) 54 self.assertEqual(self.widget. tabName(), "FitPage2")55 self.assertEqual(self.widget.getTabName(), "FitPage2") 55 56 self.assertEqual(self.widget.maxIndex, 2) 56 57 # Add an empty batch tab 57 58 self.widget.addFit(None, is_batch=True) 58 59 self.assertEqual(len(self.widget.tabs), 3) 59 self.assertEqual(self.widget. tabName(2), "BatchPage3")60 self.assertEqual(self.widget.getTabName(2), "BatchPage3") 60 61 self.assertEqual(self.widget.maxIndex, 3) 62 63 def testAddCSTab(self): 64 ''' Add a constraint/simult tab''' 65 self.widget.addConstraintTab() 66 self.assertEqual(len(self.widget.tabs), 2) 67 self.assertEqual(self.widget.getCSTabName(), "Const. & Simul. Fit1") 68 self.assertEqual(self.widget.maxCSIndex, 1) 61 69 62 70 def testResetTab(self): 63 71 ''' Remove data from last tab''' 64 72 self.assertEqual(len(self.widget.tabs), 1) 65 self.assertEqual(self.widget. tabName(), "FitPage1")73 self.assertEqual(self.widget.getTabName(), "FitPage1") 66 74 self.assertEqual(self.widget.maxIndex, 1) 67 75 … … 71 79 # see that the tab didn't disappear, just changed the name/id 72 80 self.assertEqual(len(self.widget.tabs), 1) 73 self.assertEqual(self.widget. tabName(), "FitPage2")81 self.assertEqual(self.widget.getTabName(), "FitPage2") 74 82 self.assertEqual(self.widget.maxIndex, 2) 75 83 … … 95 103 self.assertEqual(len(self.widget.tabs), 1) 96 104 self.assertEqual(self.widget.maxIndex, 2) 97 self.assertEqual(self.widget. tabName(), "FitPage2")105 self.assertEqual(self.widget.getTabName(), "FitPage2") 98 106 99 107 # Attemtp to remove the last tab … … 102 110 self.assertEqual(len(self.widget.tabs), 1) 103 111 self.assertEqual(self.widget.maxIndex, 3) 104 self.assertEqual(self.widget. tabName(), "FitPage3")112 self.assertEqual(self.widget.getTabName(), "FitPage3") 105 113 106 114 def testAllowBatch(self):
Note: See TracChangeset
for help on using the changeset viewer.