Skip to content
Snippets Groups Projects
Commit abad231d authored by Martyn Gigg's avatar Martyn Gigg
Browse files

Check point work so far.

Refs #21251
parent 62039cfa
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,9 @@ from __future__ import (absolute_import)
# 3rd party imports
from qtpy.QtWidgets import QTabWidget, QVBoxLayout, QWidget
# local imports
from mantidqt.utils.qt import import_qtlib
from .execution import PythonCodeExecution
EDITOR_LANGUAGE = "Python"
......@@ -43,10 +45,10 @@ class MultiFileCodeEditor(QWidget):
# add a single editor by default
self.append_new_editor(EDITOR_LANGUAGE)
def append_new_editor(self, language):
title = "New"
self.editors.addTab(CodeEditor(language, self.editors), title)
@property
def editor_count(self):
return self.editors.count()
def append_new_editor(self, language):
title = "New"
self.editors.addTab(CodeEditor(language, self.editors), title)
......@@ -35,6 +35,11 @@ class MultiFileCodeEditorTest(unittest.TestCase):
widget = MultiFileCodeEditor()
self.assertEqual(1, widget.editor_count)
def test_execute_current_file_executes_correct_tab(self):
# set up code in current tab
widget = MultiFileCodeEditor()
editor = self.current_editor()
if __name__ == '__main__':
unittest.main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment