Ignore:
Timestamp:
Jul 26, 2018 5:30:15 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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)
Message:

new unit test runner script + test fixes. SASVIEW-970

Location:
src/sas/qtgui/Calculators/UnitTesting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Calculators/UnitTesting/ResolutionCalculatorPanelTest.py

    re90988c r144fe21  
    1212from twisted.internet import threads 
    1313 
    14 # from UnitTesting.TestUtils import QtSignalSpy 
    15 # from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas 
     14from sas.qtgui.Utilities.GuiUtils import Communicate 
    1615from sas.qtgui.Calculators.ResolutionCalculatorPanel \ 
    1716    import ResolutionCalculatorPanel 
    18  
    19 # from sas.qtgui.MainWindow.DataManager import DataManager 
    20 # from sas.qtgui.MainWindow.GuiManager import GuiManager 
    21 # from sas.qtgui.Utilities.GuiUtils import * 
    22  
    2317 
    2418BG_COLOR_ERR = 'background-color: rgb(244, 170, 164);' 
     
    3428    """Test the ResolutionCalculator""" 
    3529    def setUp(self): 
     30        class dummy_manager(object): 
     31            communicator = Communicate() 
    3632        """Create the ResolutionCalculator""" 
    37         self.widget = ResolutionCalculatorPanel(None) 
     33        self.widget = ResolutionCalculatorPanel(dummy_manager()) 
    3834 
    3935        # self.widget.onCompute = MagicMock() 
     
    4137    def tearDown(self): 
    4238        """Destroy the ResolutionCalculator""" 
     39        if self.widget.plotter is not None: 
     40            self.widget.plotter.close() 
    4341        self.widget.close() 
    4442        self.widget = None 
  • src/sas/qtgui/Calculators/UnitTesting/SLDCalculatorTest.py

    re90988c r144fe21  
    2020import sas.qtgui.Utilities.LocalConfig 
    2121 
    22 #if not QtWidgets.QApplication.instance(): 
    23 #    app = QtWidgets.QApplication(sys.argv) 
    24 app = QtWidgets.QApplication(sys.argv) 
     22if not QtWidgets.QApplication.instance(): 
     23    app = QtWidgets.QApplication(sys.argv) 
    2524 
    2625class SldResultTest(unittest.TestCase): 
Note: See TracChangeset for help on using the changeset viewer.