def test_measure_editor_dialog2(self): # Test that everything goes well in the absence of build_deps core = self.workbench.get_plugin(u'enaml.workbench.core') cmd = u'enaml.workbench.ui.select_workspace' core.invoke_command(cmd, {'workspace': u'hqc_meas.measure.workspace'}, self) plugin = self.workbench.get_plugin(u'hqc_meas.measure') measure = Measure(plugin=plugin, name='Test') measure.root_task = RootTask() ed = MeasureEditorDialog(measure=measure, workspace=plugin.workspace) ed.show() process_app_events() ed.close() process_app_events() assert_not_in('build_deps', measure.store) close_all_windows()
def test_measure_editor_dialog1(self): # Test that the build_deps are correctly destroyed when closing. core = self.workbench.get_plugin(u'enaml.workbench.core') cmd = u'enaml.workbench.ui.select_workspace' core.invoke_command(cmd, {'workspace': u'hqc_meas.measure.workspace'}, self) plugin = self.workbench.get_plugin(u'hqc_meas.measure') measure = Measure(plugin=plugin, name='Test') measure.root_task = RootTask() measure.store['build_deps'] = 25 ed = MeasureEditorDialog(measure=measure, workspace=plugin.workspace) ed.show() process_app_events() ed.close() process_app_events() assert_not_in('build_deps', measure.store) close_all_windows()