Changeset e90988c in sasview for src/sas/qtgui/Calculators/UnitTesting
- Timestamp:
- Dec 14, 2017 9:51:02 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:
- 7fd20fc, 626c7c5
- Parents:
- 8353d90
- Location:
- src/sas/qtgui/Calculators/UnitTesting
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Calculators/UnitTesting/DataOperationUtilityTest.py
r53c771e re90988c 4 4 import logging 5 5 import unittest 6 import webbrowser 7 6 8 from PyQt5 import QtGui, QtWidgets 7 9 from PyQt5 import QtCore … … 119 121 def testHelp(self): 120 122 """ Assure help file is shown """ 121 # this should not rise123 self.widget.manager.showHelp = MagicMock() 122 124 self.widget.onHelp() 125 self.assertTrue(self.widget.manager.showHelp.called_once()) 126 args = self.widget.manager.showHelp.call_args 127 self.assertIn('data_operator_help.html', args[0][0]) 123 128 124 129 def testOnReset(self): -
src/sas/qtgui/Calculators/UnitTesting/DensityCalculatorTest.py
r53c771e re90988c 121 121 def testHelp(self): 122 122 """ Assure help file is shown """ 123 124 # this should not rise123 self.widget.manager = QtWidgets.QWidget() 124 self.widget.manager.showHelp = MagicMock() 125 125 self.widget.displayHelp() 126 self.assertTrue(self.widget.manager.showHelp.called_once()) 127 args = self.widget.manager.showHelp.call_args 128 self.assertIn('density_calculator_help.html', args[0][0]) 126 129 127 130 if __name__ == "__main__": -
src/sas/qtgui/Calculators/UnitTesting/GenericScatteringCalculatorTest.py
r53c771e re90988c 104 104 def testHelpButton(self): 105 105 """ Assure help file is shown """ 106 self.widget.manager.showHelp = MagicMock() 106 107 self.widget.onHelp() 108 self.assertTrue(self.widget.manager.showHelp.called_once()) 109 args = self.widget.manager.showHelp.call_args 110 self.assertIn('sas_calculator_help.html', args[0][0]) 107 111 108 112 def testValidator(self): -
src/sas/qtgui/Calculators/UnitTesting/KiessigCalculatorTest.py
r53c771e re90988c 5 5 from PyQt5.QtCore import Qt 6 6 7 # TEMP8 #import sas.qtgui.path_prepare9 7 import path_prepare 10 8 from unittest.mock import MagicMock 11 9 12 10 from sas.qtgui.Calculators.KiessigPanel import KiessigPanel … … 35 33 def testHelp(self): 36 34 """ Assure help file is shown """ 37 38 # this should not rise35 self.widget.manager = QtWidgets.QWidget() 36 self.widget.manager.showHelp = MagicMock() 39 37 self.widget.onHelp() 38 self.assertTrue(self.widget.manager.showHelp.called_once()) 39 args = self.widget.manager.showHelp.call_args 40 self.assertIn('kiessig_calculator_help.html', args[0][0]) 40 41 41 42 def testComplexEntryNumbers(self): -
src/sas/qtgui/Calculators/UnitTesting/ResolutionCalculatorPanelTest.py
r53c771e re90988c 240 240 """ Assure help file is shown """ 241 241 # this should not rise 242 self.widget.manager = QtWidgets.QWidget() 243 self.widget.manager.showHelp = MagicMock() 242 244 self.widget.onHelp() 245 self.assertTrue(self.widget.manager.showHelp.called_once()) 246 args = self.widget.manager.showHelp.call_args 247 self.assertIn('resolution_calculator_help.html', args[0][0]) 243 248 244 249 def testOnReset(self): -
src/sas/qtgui/Calculators/UnitTesting/SLDCalculatorTest.py
r53c771e re90988c 142 142 def testHelp(self): 143 143 """ Assure help file is shown """ 144 145 # this should not rise144 self.widget.manager = QtWidgets.QWidget() 145 self.widget.manager.showHelp = MagicMock() 146 146 self.widget.displayHelp() 147 self.assertTrue(self.widget.manager.showHelp.called_once()) 148 args = self.widget.manager.showHelp.call_args 149 self.assertIn('sld_calculator_help.html', args[0][0]) 147 150 148 151 if __name__ == "__main__": -
src/sas/qtgui/Calculators/UnitTesting/SlitSizeCalculatorTest.py
r53c771e re90988c 37 37 def testHelp(self): 38 38 """ Assure help file is shown """ 39 40 # this should not rise39 self.widget._parent = QtWidgets.QWidget() 40 self.widget._parent.showHelp = MagicMock() 41 41 self.widget.onHelp() 42 self.assertTrue(self.widget._parent.showHelp.called_once()) 43 args = self.widget._parent.showHelp.call_args 44 self.assertIn('slit_calculator_help.html', args[0][0]) 42 45 43 46 def testBrowseButton(self):
Note: See TracChangeset
for help on using the changeset viewer.