mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Fix test errors and local install for azure
Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user