From 514f26024374a8b29b6082a6b3a77c7df5e9c00e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Randy=20D=C3=B6ring?= <30527984+radoering@users.noreply.github.com> Date: Wed, 16 Nov 2022 15:50:19 +0100 Subject: [PATCH] fix test --- tests/console/commands/test_run.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/console/commands/test_run.py b/tests/console/commands/test_run.py index 8e3d9b951eb..60bc94e74a7 100644 --- a/tests/console/commands/test_run.py +++ b/tests/console/commands/test_run.py @@ -1,5 +1,7 @@ from __future__ import annotations +import subprocess + from typing import TYPE_CHECKING import pytest @@ -127,7 +129,12 @@ def test_run_script_exit_code( poetry_with_scripts: Poetry, command_tester_factory: CommandTesterFactory, tmp_venv: VirtualEnv, + mocker: MockerFixture, ) -> None: + mocker.patch( + "os.execvpe", + lambda file, args, env: subprocess.call([file] + args[1:], env=env), + ) install_tester = command_tester_factory( "install", poetry=poetry_with_scripts,