def setUp(self): self._library_manager = _library_manager() self.ctrl = Project(Namespace(FakeSettings()), FakeSettings(), self._library_manager) self.load_observer = MessageRecordingLoadObserver() self.suite_listener = PublisherListener(RideOpenSuite) self.resource_listener = PublisherListener(RideOpenResource)
def construct_chief_controller(datapath, temp_dir_for_excludes=None): settings = FakeSettings(temp_dir_for_excludes) library_manager = LibraryManager(':memory:') library_manager.create_database() chief = ChiefController(Namespace(settings), settings, library_manager) chief.load_data(datapath, NullObserver()) return chief
def OnInit(self): # Needed for SetToolTipString to work wx.HelpProvider.Set(wx.SimpleHelpProvider()) # TODO adjust to wx versions self.settings = RideSettings() librarydatabase.initialize_database() self.preferences = Preferences(self.settings) self.namespace = Namespace(self.settings) self._controller = Project(self.namespace, self.settings) self.frame = RideFrame(self, self._controller) self._editor_provider = EditorProvider() self._plugin_loader = PluginLoader(self, self._get_plugin_dirs(), coreplugins.get_core_plugins()) self._plugin_loader.enable_plugins() self.frame.Show() self.editor = self._get_editor() self._load_data() self.frame.tree.populate(self.model) self.frame.tree.set_editor(self.editor) self._find_robot_installation() self._publish_system_info() if self._updatecheck: UpdateNotifierController( self.settings).notify_update_if_needed(UpdateDialog) wx.CallLater(200, ReleaseNotes(self).bring_to_front) return True
def construct_project(datapath, temp_dir_for_excludes=None): settings = FakeSettings({'excludes': temp_dir_for_excludes}) library_manager = LibraryManager(':memory:') library_manager.create_database() project = Project(Namespace(settings), settings, library_manager) project.load_data(datapath, NullObserver()) return project
def _load(self, testcasefile): ns = Namespace(FakeSettings()) library_manager = LibraryManager(':memory:') library_manager.create_database() project = Project(ns, settings=ns._settings, library_manager=library_manager) project.load_datafile(testcasefile, MessageRecordingLoadObserver()) return ns, project._controller.data, library_manager
def test_hook_suggestions_are_included(self): self.app = FakeApplication() self.app.namespace = Namespace(self.app.settings) library_manager = LibraryManager(':memory:') library_manager.create_database() library_manager.start() self.app.namespace.set_library_manager(library_manager) pl = ContentAssistPlugin(self.app, name='test') pl.register_content_assist_hook(pl._get_content_assist_values) self._assert_contains('foo') library_manager.stop()
def construct_project(datapath, temp_dir_for_excludes=None): # print("DEBUG: construct_project with argpath: %s\n" % datapath) settings = FakeSettings({'excludes': temp_dir_for_excludes}) #print("DEBUG: construct_project FakeSettings: %s\n" % list(settings.iteritems())) library_manager = LibraryManager(':memory:') library_manager.create_database() project = Project(Namespace(settings), settings, library_manager) # print("DEBUG: construct_project Project: %s\n" % project.display_name) project.load_data(datapath) #, NullObserver()) # DEBUG # print("DEBUG: Path arg is: %s\n" % datapath) return project
def __init__(self, random, path): print 'librarydatabase.initialize_database()' print librarydatabase.initialize_database() print 'settings = RideSettings()' print 'project = Project(Namespace(settings=settings), settings=settings)' settings = RideSettings() self._project = Project(Namespace(settings=settings), settings=settings) self._path = path self._suite = None self._test = None self._keyword = None self._random = random self._skip = False
def OnInit(self): # DEBUG To test RTL # self._initial_locale = wx.Locale(wx.LANGUAGE_ARABIC) self._initial_locale = wx.Locale(wx.LANGUAGE_ENGLISH) # Needed for SetToolTipString to work wx.HelpProvider.Set( wx.SimpleHelpProvider()) # TODO adjust to wx versions self.settings = RideSettings() librarydatabase.initialize_database() self.preferences = Preferences(self.settings) self.namespace = Namespace(self.settings) self._controller = Project(self.namespace, self.settings) self.frame = RideFrame(self, self._controller) self._editor_provider = EditorProvider() self._plugin_loader = PluginLoader(self, self._get_plugin_dirs(), coreplugins.get_core_plugins()) self._plugin_loader.enable_plugins() self.treeplugin = TreePlugin(self) self.treeplugin.register_frame(self.frame) self.fileexplorerplugin = FileExplorerPlugin(self, self._controller) self.fileexplorerplugin.register_frame(self.frame) self.frame.Show() if not self.treeplugin.opened: self.treeplugin.close_tree() if not self.fileexplorerplugin.opened: self.fileexplorerplugin.close_tree() self.editor = self._get_editor() self._load_data() self.treeplugin.populate(self.model) self.treeplugin.set_editor(self.editor) self._find_robot_installation() self._publish_system_info() perspective = self.settings.get('AUI Perspective', None) if perspective: self.frame._mgr.LoadPerspective(perspective, True) if self._updatecheck: UpdateNotifierController( self.settings).notify_update_if_needed(UpdateDialog) wx.CallLater(200, ReleaseNotes(self).bring_to_front) wx.CallLater(200, self.fileexplorerplugin._update_tree) return True
def OnInit(self): self.settings = RideSettings() librarydatabase.initialize_database() self.preferences = Preferences(self.settings) self.namespace = Namespace(self.settings) self._controller = Project(self.namespace, self.settings) self.frame = RideFrame(self, self._controller) self._editor_provider = EditorProvider() self._plugin_loader = PluginLoader(self, self._get_plugin_dirs(), context.get_core_plugins()) self._plugin_loader.enable_plugins() self.editor = self._get_editor() self.editor.show() self._load_data() self.frame.tree.populate(self.model) self.frame.tree.set_editor(self.editor) self._publish_system_info() if self._updatecheck: UpdateNotifierController(self.settings).notify_update_if_needed(UpdateDialog) wx.CallLater(200, ReleaseNotes(self).bring_to_front) return True
def setUp(self): self.project = Project(Namespace(FakeSettings()), FakeSettings(), _library_manager())
def setUp(self): self.chief = ChiefController(Namespace(FakeSettings()), FakeSettings(), _library_manager())