Changeset 3c6ecd9 in sasview for src/sas/qtgui/Utilities/UnitTesting/TabbedModelEditorTest.py
- Timestamp:
- May 7, 2018 6:47:21 AM (7 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:
- 42787fb
- Parents:
- b0ba43e (diff), 80468f6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/UnitTesting/TabbedModelEditorTest.py
- Property mode changed from 100755 to 100644
r3b3b40b r80468f6 16 16 17 17 # Local 18 import sas.qtgui.Utilities.GuiUtils as GuiUtils 18 19 from sas.qtgui.Utilities.TabbedModelEditor import TabbedModelEditor 19 20 from sas.qtgui.Utilities.PluginDefinition import PluginDefinition … … 21 22 22 23 23 #if not QApplication.instance(): 24 # app = QApplication(sys.argv) 25 app = QApplication(sys.argv) 24 if not QApplication.instance(): 25 app = QApplication(sys.argv) 26 26 27 27 class TabbedModelEditorTest(unittest.TestCase): … … 30 30 Prepare the editors 31 31 """ 32 self.widget = TabbedModelEditor(None) 33 self.widget_edit = TabbedModelEditor(None, edit_only=True) 32 class dummy_manager(object): 33 _parent = QWidget() 34 communicate = GuiUtils.Communicate() 35 36 self.widget = TabbedModelEditor(parent=dummy_manager) 37 self.widget_edit = TabbedModelEditor(parent=dummy_manager, edit_only=True) 34 38 35 39 def tearDown(self): … … 139 143 140 144 141 def test PluginModelModified(self):145 def testpluginTitleSet(self): 142 146 """Test reaction to direct edit in plugin wizard""" 143 147 self.assertFalse(self.widget.is_modified) 144 148 145 149 # Call the tested method with no filename defined 146 self.widget.plugin ModelModified()150 self.widget.pluginTitleSet() 147 151 148 152 # Assure the apply button is disabled … … 157 161 self.assertIn("*", self.widget.windowTitle()) 158 162 self.assertIn(new_name, self.widget.windowTitle()) 159 self.assertTrue(self.widget.editor_widget.isEnabled())160 163 self.assertTrue(self.widget.buttonBox.button(QDialogButtonBox.Apply).isEnabled()) 161 164 self.assertTrue(self.widget.is_modified)
Note: See TracChangeset
for help on using the changeset viewer.