Changeset 72ecbdf2 in sasview for src/sas/qtgui/Perspectives/Inversion/UnitTesting
- Timestamp:
- May 2, 2018 8:59:34 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:
- b0ba43e
- Parents:
- 6da860a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Inversion/UnitTesting/InversionPerspectiveTest.py
r6bd0d81 r72ecbdf2 58 58 self.assertEqual(self.widget.windowTitle(), "P(r) Inversion Perspective") 59 59 self.assertFalse(self.widget.isClosable()) 60 self.assertFalse(self.widget.isCalculating) 60 61 # mapper 61 62 self.assertIsInstance(self.widget.mapper, QtWidgets.QDataWidgetMapper) … … 76 77 self.assertFalse(self.widget.calculateThisButton.isEnabled()) 77 78 self.assertFalse(self.widget.removeButton.isEnabled()) 79 self.assertTrue(self.widget.stopButton.isEnabled()) 80 self.assertFalse(self.widget.stopButton.isVisible()) 78 81 self.assertFalse(self.widget.regConstantSuggestionButton.isEnabled()) 79 82 self.assertFalse(self.widget.noOfTermsSuggestionButton.isEnabled()) … … 154 157 self.twoDataSetState() 155 158 self.widget.calculateAllButton.click() 159 self.assertTrue(self.widget.isCalculating) 160 self.assertTrue(self.widget.isBatch) 161 self.assertTrue(self.widget.stopButton.isVisible()) 162 self.assertTrue(self.widget.stopButton.isEnabled()) 156 163 self.assertIsNotNone(self.widget.batchResultsWindow) 157 164 self.assertTrue(self.widget.batchResultsWindow.cmdHelp.isEnabled()) 158 165 self.assertEqual(self.widget.batchResultsWindow.tblParams.columnCount(), 9) 159 166 self.assertEqual(self.widget.batchResultsWindow.tblParams.rowCount(), 2) 160 if self.widget.isBatch: 161 self.widget.isBatch = False 167 # Test stop button 168 self.widget.stopButton.click() 169 self.assertTrue(self.widget.batchResultsWindow.isVisible()) 170 self.assertFalse(self.widget.stopButton.isVisible()) 171 self.assertTrue(self.widget.stopButton.isEnabled()) 172 self.assertFalse(self.widget.isBatch) 173 self.assertFalse(self.widget.isCalculating) 162 174 self.widget.batchResultsWindow.close() 163 175 self.assertIsNone(self.widget.batchResultsWindow) 164 176 # Last test 165 self.widget.removeData()166 177 self.removeAllData() 167 178 self.baseBatchState() … … 218 229 self.widget.noOfTermsInput.setText("") 219 230 n = self.widget.getNFunc() 220 self.assertEqual(cm.output, ['ERROR: root:Incorrect number of terms specified: '])231 self.assertEqual(cm.output, ['ERROR:sas.qtgui.Perspectives.Inversion.InversionPerspective:Incorrect number of terms specified: ']) 221 232 self.assertEqual(self.widget.getNFunc(), 10) 222 233 # string … … 224 235 self.widget.noOfTermsInput.setText("Nordvest Pizza") 225 236 n = self.widget.getNFunc() 226 self.assertEqual(cm.output, ['ERROR: root:Incorrect number of terms specified: Nordvest Pizza'])237 self.assertEqual(cm.output, ['ERROR:sas.qtgui.Perspectives.Inversion.InversionPerspective:Incorrect number of terms specified: Nordvest Pizza']) 227 238 self.assertEqual(self.widget.getNFunc(), 10) 228 239 self.removeAllData()
Note: See TracChangeset
for help on using the changeset viewer.