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 Nov 4, 2022
1 parent 93bc0e7 commit 3122b56
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 3122b56

Please sign in to comment.