From 0d1e90e3f444c98fbbc243e7040f384496983b93 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 30 Mar 2022 18:24:42 +0200 Subject: Fix test_editor --- tests/unit/misc/test_editor.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/unit/misc/test_editor.py b/tests/unit/misc/test_editor.py index 8e5597a0e..ad3f665b4 100644 --- a/tests/unit/misc/test_editor.py +++ b/tests/unit/misc/test_editor.py @@ -19,6 +19,7 @@ """Tests for qutebrowser.misc.editor.""" +import sys import time import pathlib import os @@ -55,17 +56,17 @@ class TestArg: def test_placeholder(self, config_stub, editor): """Test starting editor with placeholder argument.""" - config_stub.val.editor.command = ['bin', 'foo', '{}', 'bar'] + config_stub.val.editor.command = [sys.executable, 'foo', '{}', 'bar'] editor.edit("") editor._proc._proc.start.assert_called_with( - "bin", ["foo", editor._filename, "bar"]) + sys.executable, ["foo", editor._filename, "bar"]) def test_placeholder_inline(self, config_stub, editor): """Test starting editor with placeholder arg inside of another arg.""" - config_stub.val.editor.command = ['bin', 'foo{}', 'bar'] + config_stub.val.editor.command = [sys.executable, 'foo{}', 'bar'] editor.edit("") editor._proc._proc.start.assert_called_with( - "bin", ["foo" + editor._filename, "bar"]) + sys.executable, ["foo" + editor._filename, "bar"]) class TestFileHandling: -- cgit v1.2.3-54-g00ecf