Changeset 144fe21 in sasview for src/sas/qtgui/Calculators/UnitTesting
- Timestamp:
- Jul 26, 2018 5:30:15 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:
- dc71408
- Parents:
- e793f62
- git-author:
- Piotr Rozyczko <rozyczko@…> (07/26/18 05:28:51)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (07/26/18 05:30:15)
- Location:
- src/sas/qtgui/Calculators/UnitTesting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Calculators/UnitTesting/ResolutionCalculatorPanelTest.py
re90988c r144fe21 12 12 from twisted.internet import threads 13 13 14 # from UnitTesting.TestUtils import QtSignalSpy 15 # from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas 14 from sas.qtgui.Utilities.GuiUtils import Communicate 16 15 from sas.qtgui.Calculators.ResolutionCalculatorPanel \ 17 16 import ResolutionCalculatorPanel 18 19 # from sas.qtgui.MainWindow.DataManager import DataManager20 # from sas.qtgui.MainWindow.GuiManager import GuiManager21 # from sas.qtgui.Utilities.GuiUtils import *22 23 17 24 18 BG_COLOR_ERR = 'background-color: rgb(244, 170, 164);' … … 34 28 """Test the ResolutionCalculator""" 35 29 def setUp(self): 30 class dummy_manager(object): 31 communicator = Communicate() 36 32 """Create the ResolutionCalculator""" 37 self.widget = ResolutionCalculatorPanel( None)33 self.widget = ResolutionCalculatorPanel(dummy_manager()) 38 34 39 35 # self.widget.onCompute = MagicMock() … … 41 37 def tearDown(self): 42 38 """Destroy the ResolutionCalculator""" 39 if self.widget.plotter is not None: 40 self.widget.plotter.close() 43 41 self.widget.close() 44 42 self.widget = None -
src/sas/qtgui/Calculators/UnitTesting/SLDCalculatorTest.py
re90988c r144fe21 20 20 import sas.qtgui.Utilities.LocalConfig 21 21 22 #if not QtWidgets.QApplication.instance(): 23 # app = QtWidgets.QApplication(sys.argv) 24 app = QtWidgets.QApplication(sys.argv) 22 if not QtWidgets.QApplication.instance(): 23 app = QtWidgets.QApplication(sys.argv) 25 24 26 25 class SldResultTest(unittest.TestCase):
Note: See TracChangeset
for help on using the changeset viewer.