Changeset 6548a01 in sasview for src/sas/qtgui/Perspectives
- Timestamp:
- Jul 20, 2018 4:47:33 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:
- da046c99
- Parents:
- 200ce9c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingPerspectiveTest.py
r80468f6 r6548a01 43 43 self.assertEqual(self.widget.optimizer, "Levenberg-Marquardt") 44 44 self.assertEqual(len(self.widget.tabs), 1) 45 self.assertEqual(self.widget.maxIndex, 1)45 self.assertEqual(self.widget.maxIndex, 2) 46 46 self.assertEqual(self.widget.getTabName(), "FitPage1") 47 47 … … 53 53 self.assertEqual(len(self.widget.tabs), 2) 54 54 self.assertEqual(self.widget.getTabName(), "FitPage2") 55 self.assertEqual(self.widget.maxIndex, 2)55 self.assertEqual(self.widget.maxIndex, 3) 56 56 # Add an empty batch tab 57 57 self.widget.addFit(None, is_batch=True) 58 58 self.assertEqual(len(self.widget.tabs), 3) 59 59 self.assertEqual(self.widget.getTabName(2), "BatchPage3") 60 self.assertEqual(self.widget.maxIndex, 3)60 self.assertEqual(self.widget.maxIndex, 4) 61 61 62 62 def testAddCSTab(self): … … 70 70 self.assertEqual(len(self.widget.tabs), 1) 71 71 self.assertEqual(self.widget.getTabName(), "FitPage1") 72 self.assertEqual(self.widget.maxIndex, 1)72 self.assertEqual(self.widget.maxIndex, 2) 73 73 74 74 # Attempt to remove the last tab … … 78 78 self.assertEqual(len(self.widget.tabs), 1) 79 79 self.assertEqual(self.widget.getTabName(), "FitPage2") 80 self.assertEqual(self.widget.maxIndex, 2)80 self.assertEqual(self.widget.maxIndex, 3) 81 81 82 82 # Now, add data … … 100 100 self.widget.tabCloses(1) 101 101 self.assertEqual(len(self.widget.tabs), 1) 102 self.assertEqual(self.widget.maxIndex, 2)102 self.assertEqual(self.widget.maxIndex, 3) 103 103 self.assertEqual(self.widget.getTabName(), "FitPage2") 104 104 … … 107 107 # The tab should still be there 108 108 self.assertEqual(len(self.widget.tabs), 1) 109 self.assertEqual(self.widget.maxIndex, 3)109 self.assertEqual(self.widget.maxIndex, 4) 110 110 self.assertEqual(self.widget.getTabName(), "FitPage3") 111 111 … … 166 166 167 167 # Check the names of the new tabs 168 self.assertEqual(self.widget.tabText(1), "BatchPage 1")169 self.assertEqual(self.widget.tabText(2), "BatchPage 2")168 self.assertEqual(self.widget.tabText(1), "BatchPage2") 169 self.assertEqual(self.widget.tabText(2), "BatchPage3") 170 170 171 171 if __name__ == "__main__":
Note: See TracChangeset
for help on using the changeset viewer.