Changeset 6bd0d81 in sasview


Ignore:
Timestamp:
Apr 26, 2018 4:11:47 PM (4 years ago)
Author:
krzywon
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:
6da860a
Parents:
d79bb7e
Message:

Unit tests for dmax window.

File:
1 edited

Legend:

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

    rd79bb7e r6bd0d81  
    154154        self.twoDataSetState() 
    155155        self.widget.calculateAllButton.click() 
    156         self.assertTrue(self.widget.batchResultsWindow is not None) 
     156        self.assertIsNotNone(self.widget.batchResultsWindow) 
     157        self.assertTrue(self.widget.batchResultsWindow.cmdHelp.isEnabled()) 
    157158        self.assertEqual(self.widget.batchResultsWindow.tblParams.columnCount(), 9) 
    158159        self.assertEqual(self.widget.batchResultsWindow.tblParams.rowCount(), 2) 
     
    160161            self.widget.isBatch = False 
    161162        self.widget.batchResultsWindow.close() 
    162         self.assertTrue(self.widget.batchResultsWindow is None) 
     163        self.assertIsNone(self.widget.batchResultsWindow) 
    163164        # Last test 
    164165        self.widget.removeData() 
     
    193194        self.widget.close() 
    194195        self.assertTrue(self.widget.isMinimized()) 
    195         self.assertTrue(self.widget.dmaxWindow is None) 
    196         self.assertTrue(self.widget.batchResultsWindow is None) 
     196        self.assertIsNone(self.widget.dmaxWindow) 
     197        self.assertIsNone(self.widget.batchResultsWindow) 
    197198        self.widget.setClosable(False) 
    198199        self.assertFalse(self.widget.isClosable()) 
     
    283284        self.removeAllData() 
    284285 
    285     def notestHelp(self): 
    286         """ test help widget show """ 
    287         # TODO: test help button(s) 
    288         pass 
    289  
    290     def notestOpenExplorerWindow(self): 
     286    def testOpenExplorerWindow(self): 
    291287        """ open Dx window """ 
    292         # TODO: test explorer functionality 
     288        self.assertIsNone(self.widget.dmaxWindow) 
     289        self.assertFalse(self.widget.explorerButton.isEnabled()) 
    293290        self.widget.openExplorerWindow() 
     291        self.assertIsNotNone(self.widget.dmaxWindow) 
    294292        self.assertTrue(self.widget.dmaxWindow.isVisible()) 
     293        self.assertTrue(self.widget.dmaxWindow.windowTitle() == "Dₐₓ Explorer") 
    295294 
    296295 
Note: See TracChangeset for help on using the changeset viewer.