diff --git a/.azure-pipelines/jobs/run-tests.yml b/.azure-pipelines/jobs/run-tests.yml index 74235a49..2602cba6 100644 --- a/.azure-pipelines/jobs/run-tests.yml +++ b/.azure-pipelines/jobs/run-tests.yml @@ -18,7 +18,7 @@ steps: echo "Installing Pipenv…" pip install -e "$(pwd)[test]" --upgrade pipenv install --deploy --dev - pip install -e "$(pwd)[test]" --upgrade + pipenv run pip install -e "$(pwd)[test]" --upgrade echo pipenv --venv && echo pipenv --py && echo pipenv run python --version displayName: Make Virtualenv diff --git a/tests/integration/test_pipenv.py b/tests/integration/test_pipenv.py index deacc495..3f114288 100644 --- a/tests/integration/test_pipenv.py +++ b/tests/integration/test_pipenv.py @@ -100,10 +100,15 @@ def test_directory_with_leading_dash(PipenvInstance): return mkdtemp(suffix, prefix, dir) with mock.patch('pipenv.vendor.vistir.compat.mkdtemp', side_effect=mocked_mkdtemp): + del os.environ['PIPENV_VENV_IN_PROJECT'] with temp_environ(), PipenvInstance(chdir=True) as p: - del os.environ['PIPENV_VENV_IN_PROJECT'] - p.pipenv('--python python') - venv_path = p.pipenv('--venv').out.strip() + if "PIPENV_VENV_IN_PROJECT" in os.environ: + del os.environ['PIPENV_VENV_IN_PROJECT'] + c = p.pipenv('--python python') + assert c.return_code == 0 + c = p.pipenv('--venv') + assert c.return_code == 0 + venv_path = c.out.strip() assert os.path.isdir(venv_path) # Manually clean up environment, since PipenvInstance assumes that # the virutalenv is in the project directory. diff --git a/tests/integration/test_project.py b/tests/integration/test_project.py index 237fd483..487524c6 100644 --- a/tests/integration/test_project.py +++ b/tests/integration/test_project.py @@ -183,7 +183,7 @@ def test_run_in_virtualenv_with_global_context(PipenvInstance, pypi, virtualenv) 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(virtualenv)) + assert c.out.strip().startswith(virtualenv.as_posix()) c = p.pipenv("clean --dry-run") assert c.return_code == 0 assert "click" in c.out