Open jaraco opened 6 years ago
Hmm. The test doesn't fail if I run it by itself.
$ tox -- -k test_pip_upgrade_from_source
python develop-inst-nodeps: /Users/jaraco/Dropbox/code/main/setuptools
python installed: apipkg==1.4,attrs==17.4.0,contextlib2==0.5.5,execnet==1.5.0,flake8==3.5.0,mccabe==0.6.1,mock==2.0.0,path.py==11.0,pbr==3.1.1,pluggy==0.6.0,py==1.5.2,pycodestyle==2.3.1,pyflakes==1.6.0,pytest==3.4.1,pytest-fixture-config==1.2.11,pytest-flake8==0.9.1,pytest-shutil==1.2.11,pytest-virtualenv==1.2.11,six==1.11.0,virtualenv==15.1.0
python runtests: PYTHONHASHSEED='2691913991'
python runtests: commands[0] | py.test -k test_pip_upgrade_from_source
============================================================================================== test session starts ==============================================================================================
platform darwin -- Python 3.7.0b2, pytest-3.4.1, py-1.5.2, pluggy-0.6.0
rootdir: /Users/jaraco/Dropbox/code/main/setuptools, inifile: pytest.ini
plugins: virtualenv-1.2.11, shutil-1.2.11, flake8-0.9.1
collected 410 items / 2 skipped
setuptools/tests/test_virtualenv.py . [100%]
============================================================================================ short test summary info ============================================================================================
SKIP [2] /Users/jaraco/Dropbox/code/main/setuptools/setuptools/tests/test_msvc.py:18: could not import 'distutils.msvc9compiler'
============================================================================================= 409 tests deselected ==============================================================================================
============================================================================== 1 passed, 2 skipped, 409 deselected in 6.11 seconds ==============================================================================
____________________________________________________________________________________________________ summary ____________________________________________________________________________________________________
python: commands succeeded
congratulations :)
But it does fail with $ tox -- -k 'clean_env_install or test_pip_upgrade_from_source'
... just the one additional test causes the second to fail.
I've determined that the teardown isn't getting evaluated on bare_virtualenv.
So the isuse is likely not due to my os (macOS), but probably due to the fact I have tox-venv
installed. When I run virtualenv.run('python -c "import sys; print(sys.prefix)"')
, the value is the same as the venv in which the tests are running. It's probably a defect with pytest_virtualenv
when tox-venv
is installed.
From my experience, creating a virtualenv from inside a venv, or a venv from a virtualenv does not work right.
When running the tests on macOS on Python (3.6, 3.7.0b2 but not 2.7), I see this failure.
The failure doesn't happen on Linux, so I presume the issue is isolated to macOS (or maybe something about my environment).