summaryrefslogtreecommitdiff
path: root/tests/end2end/features/test_editor_bdd.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/end2end/features/test_editor_bdd.py')
-rw-r--r--tests/end2end/features/test_editor_bdd.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/end2end/features/test_editor_bdd.py b/tests/end2end/features/test_editor_bdd.py
index 40f77a0f7..6a4da49de 100644
--- a/tests/end2end/features/test_editor_bdd.py
+++ b/tests/end2end/features/test_editor_bdd.py
@@ -178,33 +178,3 @@ def save_editor_wait(tmpdir):
# for posix, there IS a member so we need to ignore useless-suppression
# pylint: disable=no-member,useless-suppression
os.kill(pid, signal.SIGUSR2)
-
-
-@bdd.when(bdd.parsers.parse('I setup a fake {kind} fileselector '
- 'selecting "{files}" and writes to {output_type}'))
-def set_up_fileselector(quteproc, py_proc, kind, files, output_type):
- """Set up fileselect.xxx.command to select the file(s)."""
- cmd, args = py_proc(r"""
- import os
- import sys
- tmp_file = None
- for i, arg in enumerate(sys.argv):
- if arg.startswith('--file='):
- tmp_file = arg[len('--file='):]
- sys.argv.pop(i)
- break
- selected_files = sys.argv[1:]
- if tmp_file is None:
- for selected_file in selected_files:
- print(os.path.abspath(selected_file))
- else:
- with open(tmp_file, 'w') as f:
- for selected_file in selected_files:
- f.write(os.path.abspath(selected_file) + '\n')
- """)
- args += files.split(' ')
- if output_type == "a temporary file":
- args += ['--file={}']
- fileselect_cmd = json.dumps([cmd, *args])
- quteproc.set_setting('fileselect.handler', 'external')
- quteproc.set_setting(f'fileselect.{kind}.command', fileselect_cmd)