Changeset 27313b7 in sasview for src/sas/qtgui/UnitTesting/PlotterBaseTest.py
- Timestamp:
- Dec 13, 2016 4:28:07 AM (8 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:
- 63974f0
- Parents:
- c4e5400
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/UnitTesting/PlotterBaseTest.py
rc4e5400 r27313b7 13 13 14 14 from sas.qtgui.ScaleProperties import ScaleProperties 15 from sas.qtgui.WindowTitle import WindowTitle 15 16 #import sas.qtgui.GuiUtils as GuiUtils 16 17 from sas.qtgui.GuiUtils import * … … 155 156 self.assertTrue(self.clipboard_called) 156 157 158 def testOnWindowsTitle(self): 159 ''' test changing the plot title''' 160 # Mock the modal dialog's response 161 QtGui.QDialog.exec_ = MagicMock(return_value=QtGui.QDialog.Accepted) 162 self.plotter.show() 163 # Assure the original title is none 164 self.assertEqual(self.plotter.windowTitle(), "") 165 self.plotter.manager.communicator = MagicMock() 166 167 WindowTitle.title = MagicMock(return_value="I am a new title") 168 # Change the title 169 self.plotter.onWindowsTitle() 170 171 self.assertEqual(self.plotter.windowTitle(), "I am a new title") 157 172 158 173 if __name__ == "__main__":
Note: See TracChangeset
for help on using the changeset viewer.