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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Inversion/UnitTesting/InversionPerspectiveTest.py

    • Property mode changed from 100755 to 100644
    r72ecbdf2 r144fe21  
    1212import sas.qtgui.Utilities.GuiUtils as GuiUtils 
    1313 
    14 #if not QtWidgets.QApplication.instance(): 
    15 app = QtWidgets.QApplication(sys.argv) 
     14if not QtWidgets.QApplication.instance(): 
     15    app = QtWidgets.QApplication(sys.argv) 
    1616 
    1717 
     
    1919    HELP_DIRECTORY_LOCATION = "html" 
    2020    communicate = Communicate() 
    21  
    2221    def communicator(self): 
    2322        return self.communicate 
     
    2928    def setUp(self): 
    3029        """ Create the InversionWindow """ 
    31         self.widget = InversionWindow(dummy_manager()) 
     30 
     31        self.widget = InversionWindow(parent=dummy_manager()) 
     32        self.widget._parent = QtWidgets.QMainWindow() 
     33        self.widget.showBatchOutput = MagicMock() 
     34        self.widget.startThread = MagicMock() 
     35        self.widget.startThreadAll = MagicMock() 
    3236        self.widget.show() 
     37 
    3338        self.fakeData1 = GuiUtils.HashableStandardItem("A") 
    3439        self.fakeData2 = GuiUtils.HashableStandardItem("B") 
     
    96101        self.assertTrue(self.widget.allowBatch()) 
    97102        self.assertFalse(self.widget.isBatch) 
    98         self.assertIsNone(self.widget.batchResultsWindow) 
    99103        self.assertFalse(self.widget.calculateAllButton.isEnabled()) 
    100104        self.assertEqual(len(self.widget.batchResults), 0) 
    101105        self.assertEqual(len(self.widget.batchComplete), 0) 
    102106        self.widget.closeBatchResults() 
    103         self.assertIsNone(self.widget.batchResultsWindow) 
    104107 
    105108    def zeroDataSetState(self): 
     
    206209        self.assertTrue(self.widget.isMinimized()) 
    207210        self.assertIsNone(self.widget.dmaxWindow) 
    208         self.assertIsNone(self.widget.batchResultsWindow) 
    209211        self.widget.setClosable(False) 
    210212        self.assertFalse(self.widget.isClosable()) 
Note: See TracChangeset for help on using the changeset viewer.