Skip to content

Commit

Permalink
Fix task test not working on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldel committed Nov 2, 2018
1 parent d328acd commit c35ff74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion tests/console/commands/test_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,11 @@ def test_task(app):
tester = CommandTester(command)

tester.execute([("command", command.get_name()), ("task", "echo")])
with open("/tmp/poetry_test_task.txt", "r") as f:

path = Path(".temp/poetry_test_task.txt")
with path.open("r") as f:
assert f.read() == "Hello World!\n"

# cleanup
Path.unlink(path)
Path.rmdir(path.parent)
2 changes: 1 addition & 1 deletion tests/fixtures/project_with_tasks/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ authors = ["Your Name <[email protected]>"]
license = "MIT"

[tool.poetry.tasks]
echo = "echo 'Hello World!' > /tmp/poetry_test_task.txt"
echo = "mkdir .temp && echo 'Hello World!' > .temp/poetry_test_task.txt"

0 comments on commit c35ff74

Please sign in to comment.