def open(self, data): self.reset() self._data = data try: self._suggestions = SuggestionSource(None, data._data.tests[0]) except IndexError: # It is a new project, no content yet self._suggestions = SuggestionSource(None, BuiltInLibrariesSuggester()) if not self._editor: self._stored_text = self._data.content else: self._editor.set_text(self._data.content) self.set_editor_caret_position()
def setUp(self): self._suggester = BuiltInLibrariesSuggester()