Skip to content

Commit

Permalink
fix test for windows platform
Browse files Browse the repository at this point in the history
  • Loading branch information
wagnerluis1982 committed Oct 7, 2022
1 parent fcd6a12 commit a839b74
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/console/commands/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a839b74

Please sign in to comment.