From a839b7487cb94258a1bf498bd89d9945c533c7d7 Mon Sep 17 00:00:00 2001 From: Wagner Macedo Date: Fri, 7 Oct 2022 23:18:48 +0200 Subject: [PATCH] fix test for windows platform --- tests/console/commands/test_run.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/console/commands/test_run.py b/tests/console/commands/test_run.py index 40c70adc4b9..04f0854c047 100644 --- a/tests/console/commands/test_run.py +++ b/tests/console/commands/test_run.py @@ -122,11 +122,15 @@ def test_run_project_script( If RunCommand calls an installed script defined in pyproject.toml, sys.argv[0] must be set to the full path of the script. """ + cli_script = "foo" + if installed_script: - cli_script = tmp_venv._bin_dir / "foo" + if WINDOWS: + cli_script += ".exe" + cli_script = tmp_venv._bin_dir / cli_script cli_script.touch() - else: - cli_script = "foo" + if WINDOWS: + cli_script = str(cli_script).replace("\\", "\\\\") poetry = Factory().create_poetry( Path(__file__).parent.parent.parent / "fixtures" / "simple_project"