From d91a9d4fa6a58bfe76031941c4dea9bbe73ed11d Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Fri, 3 Apr 2020 16:02:24 -0400 Subject: [PATCH] Normalize paths in test_run_in_virtualenv for windows Signed-off-by: Dan Ryan --- tests/integration/test_project.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_project.py b/tests/integration/test_project.py index bef9912f..ce5ab380 100644 --- a/tests/integration/test_project.py +++ b/tests/integration/test_project.py @@ -8,7 +8,7 @@ import pytest from pipenv.patched import pipfile from pipenv.project import Project -from pipenv.utils import temp_environ +from pipenv.utils import temp_environ, normalize_path from pipenv.vendor.vistir.path import is_in_path from pipenv.vendor.delegator import run as delegator_run @@ -221,7 +221,9 @@ def test_run_in_virtualenv(PipenvInstance): assert c.return_code == 0 c = p.pipenv('run python -c "import click;print(click.__file__)"') assert c.return_code == 0 - assert c.out.strip().startswith(str(project.virtualenv_location)) + assert normalize_path(c.out.strip()).startswith( + normalize_path(str(project.virtualenv_location)) + ) c = p.pipenv("clean --dry-run") assert c.return_code == 0 assert "click" in c.out