Fix test errors and local install for azure

Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
Dan Ryan
2019-02-19 09:34:48 -05:00
parent a5224303c0
commit 5ac228e68f
3 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -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
+8 -3
View File
@@ -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.
+1 -1
View File
@@ -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