Skip to content

Test failures occur when running from inside a linked worktree #6707

@chrahunt

Description

@chrahunt

Environment

  • pip version: master
  • Python version: 3.7.2
  • OS: Ubuntu Linux 18.04

Description

When running tox -e py37 from a linked working tree there are a few test failures.

Expected behavior

Tests should behave the same regardless of whether we are running from the main working tree or a linked working tree.

How to Reproduce

cd $(mktemp -d)
python -m venv .venv
. .venv/bin/activate
pip install tox
git clone https://github.com/pypa/pip.git
cd pip
tox -e py37
git checkout -b other-master
git worktree add ../pip2 master
cd ../pip2
tox -e py37
Full Output
$ cd $(mktemp -d)
$ pwd
/tmp/user/1000/tmp.F1f9ZebUlx
$ python -m venv .venv
$ . .venv/bin/activate
(.venv) $ pip install tox
Collecting tox
  Using cached https://files.pythonhosted.org/packages/3f/21/66868fc9074e366d0dc6952c53c918230e772fd662e69b331bac7a67fcbe/tox-3.13.2-py2.py3-none-any.whl
Collecting importlib-metadata<1,>=0.12 (from tox)
  Using cached https://files.pythonhosted.org/packages/bd/23/dce4879ec58acf3959580bfe769926ed8198727250c5e395e6785c764a02/importlib_metadata-0.18-py2.py3-none-any.whl
Collecting py<2,>=1.4.17 (from tox)
  Using cached https://files.pythonhosted.org/packages/76/bc/394ad449851729244a97857ee14d7cba61ddb268dce3db538ba2f2ba1f0f/py-1.8.0-py2.py3-none-any.whl
Collecting packaging>=14 (from tox)
  Using cached https://files.pythonhosted.org/packages/91/32/58bc30e646e55eab8b21abf89e353f59c0cc02c417e42929f4a9546e1b1d/packaging-19.0-py2.py3-none-any.whl
Collecting toml>=0.9.4 (from tox)
  Using cached https://files.pythonhosted.org/packages/a2/12/ced7105d2de62fa7c8fb5fce92cc4ce66b57c95fb875e9318dba7f8c5db0/toml-0.10.0-py2.py3-none-any.whl
Collecting six<2,>=1.0.0 (from tox)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting pluggy<1,>=0.12.0 (from tox)
  Using cached https://files.pythonhosted.org/packages/06/ee/de89e0582276e3551df3110088bf20844de2b0e7df2748406876cc78e021/pluggy-0.12.0-py2.py3-none-any.whl
Collecting virtualenv>=14.0.0 (from tox)
  Using cached https://files.pythonhosted.org/packages/c4/9a/a3f62ac5122a65dec34ad4b5ed8d802633dae4bc06a0fc62e55fe3e96fe1/virtualenv-16.6.1-py2.py3-none-any.whl
Collecting filelock<4,>=3.0.0 (from tox)
  Using cached https://files.pythonhosted.org/packages/93/83/71a2ee6158bb9f39a90c0dea1637f81d5eef866e188e1971a1b1ab01a35a/filelock-3.0.12-py3-none-any.whl
Collecting zipp>=0.5 (from importlib-metadata<1,>=0.12->tox)
  Using cached https://files.pythonhosted.org/packages/da/bd/1a5fdf15aa44231fd09f63ecf175b60f057ae37ec65b343bb009364923f3/zipp-0.5.2-py2.py3-none-any.whl
Collecting pyparsing>=2.0.2 (from packaging>=14->tox)
  Using cached https://files.pythonhosted.org/packages/dd/d9/3ec19e966301a6e25769976999bd7bbe552016f0d32b577dc9d63d2e0c49/pyparsing-2.4.0-py2.py3-none-any.whl
Installing collected packages: zipp, importlib-metadata, py, pyparsing, six, packaging, toml, pluggy, virtualenv, filelock, tox
Successfully installed filelock-3.0.12 importlib-metadata-0.18 packaging-19.0 pluggy-0.12.0 py-1.8.0 pyparsing-2.4.0 six-1.12.0 toml-0.10.0 tox-3.13.2 virtualenv-16.6.1 zipp-0.5.2
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(.venv) $ git clone https://github.com/pypa/pip.git
Cloning into 'pip'...
remote: Enumerating objects: 60, done.
remote: Counting objects: 100% (60/60), done.
remote: Compressing objects: 100% (39/39), done.
remote: Total 41694 (delta 28), reused 32 (delta 19), pack-reused 41634
Receiving objects: 100% (41694/41694), 49.59 MiB | 59.60 MiB/s, done.
Resolving deltas: 100% (28443/28443), done.
(.venv) $ cd pip
(.venv) $ tox -e py37
GLOB sdist-make: /tmp/user/1000/tmp.F1f9ZebUlx/pip/setup.py
py37 create: /tmp/user/1000/tmp.F1f9ZebUlx/pip/.tox/py37
py37 installdeps: -r/tmp/user/1000/tmp.F1f9ZebUlx/pip/tools/tests-requirements.txt
py37 inst: /tmp/user/1000/tmp.F1f9ZebUlx/pip/.tox/.tmp/package/1/pip-19.2.dev0.zip
py37 installed: apipkg==1.5,atomicwrites==1.3.0,attrs==19.1.0,coverage==4.5.3,execnet==1.6.0,freezegun==0.3.12,importlib-metadata==0.18,mock==3.0.5,more-itertools==7.1.0,pip==19.2.dev0,pluggy==0.12.0,pretend==1.0.9,py==1.8.0,pytest==3.8.2,pytest-cov==2.7.1,pytest-forked==1.0.2,pytest-rerunfailures==6.0,pytest-timeout==1.3.3,pytest-xdist==1.27.0,python-dateutil==2.8.0,PyYAML==5.1.1,scripttest==1.3,setuptools==41.0.1,six==1.12.0,virtualenv==16.6.1,wheel==0.33.4,zipp==0.5.2
py37 run-test-pre: PYTHONHASHSEED='4009095841'
py37 run-test-pre: commands[0] | python -c 'import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)' /tmp/user/1000/tmp.F1f9ZebUlx/pip/tests/data/common_wheels
py37 run-test-pre: commands[1] | python /tmp/user/1000/tmp.F1f9ZebUlx/pip/tools/tox_pip.py wheel -w /tmp/user/1000/tmp.F1f9ZebUlx/pip/tests/data/common_wheels -r /tmp/user/1000/tmp.F1f9ZebUlx/pip/tools/tests-common_wheels-requirements.txt
Collecting setuptools>=40.8.0 (from -r tools/tests-common_wheels-requirements.txt (line 8))
  Using cached https://files.pythonhosted.org/packages/ec/51/f45cea425fd5cb0b0380f5b0f048ebc1da5b417e48d304838c02d6288a1e/setuptools-41.0.1-py2.py3-none-any.whl
  Saved ./tests/data/common_wheels/setuptools-41.0.1-py2.py3-none-any.whl
Collecting wheel (from -r tools/tests-common_wheels-requirements.txt (line 9))
  Using cached https://files.pythonhosted.org/packages/bb/10/44230dd6bf3563b8f227dbf344c908d412ad2ff48066476672f3a72e174e/wheel-0.33.4-py2.py3-none-any.whl
  Saved ./tests/data/common_wheels/wheel-0.33.4-py2.py3-none-any.whl
Skipping setuptools, due to already being wheel.
Skipping wheel, due to already being wheel.
py37 run-test: commands[0] | pytest --timeout 300
=============================================================================================== test session starts ================================================================================================
platform linux -- Python 3.7.2, pytest-3.8.2, py-1.8.0, pluggy-0.12.0
rootdir: /tmp/user/1000/tmp.F1f9ZebUlx/pip, inifile: setup.cfg
plugins: xdist-1.27.0, cov-2.7.1, rerunfailures-6.0, timeout-1.3.3, forked-1.0.2
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 1422 items

tests/functional/test_broken_stdout.py ...                                                                                                                                                                   [  0%]
tests/functional/test_check.py ..........                                                                                                                                                                    [  0%]
tests/functional/test_completion.py .....................                                                                                                                                                    [  2%]
tests/functional/test_configuration.py .s...                                                                                                                                                                 [  2%]
tests/functional/test_debug.py ...                                                                                                                                                                           [  2%]
tests/functional/test_download.py ..............................                                                                                                                                             [  5%]
tests/functional/test_freeze.py ......x..............                                                                                                                                                        [  6%]
tests/functional/test_hash.py ...                                                                                                                                                                            [  6%]
tests/functional/test_help.py .......                                                                                                                                                                        [  7%]
tests/functional/test_install.py .........................................s..........................................................                                                                        [ 14%]
tests/functional/test_install_check.py ..                                                                                                                                                                    [ 14%]
tests/functional/test_install_cleanup.py ........                                                                                                                                                            [ 14%]
tests/functional/test_install_compat.py ..                                                                                                                                                                   [ 15%]
tests/functional/test_install_config.py ........                                                                                                                                                             [ 15%]
tests/functional/test_install_extras.py .......                                                                                                                                                              [ 16%]
tests/functional/test_install_force_reinstall.py ..                                                                                                                                                          [ 16%]
tests/functional/test_install_index.py ....                                                                                                                                                                  [ 16%]
tests/functional/test_install_reqs.py ..............................x...                                                                                                                                     [ 18%]
tests/functional/test_install_upgrade.py ...................                                                                                                                                                 [ 20%]
tests/functional/test_install_user.py .........                                                                                                                                                              [ 20%]
tests/functional/test_install_vcs_git.py ......................                                                                                                                                              [ 22%]
tests/functional/test_install_wheel.py .........................                                                                                                                                             [ 24%]
tests/functional/test_list.py ............................                                                                                                                                                   [ 26%]
tests/functional/test_no_color.py .                                                                                                                                                                          [ 26%]
tests/functional/test_pep517.py ...........                                                                                                                                                                  [ 27%]
tests/functional/test_requests.py s                                                                                                                                                                          [ 27%]
tests/functional/test_search.py ...s.......                                                                                                                                                                  [ 27%]
tests/functional/test_show.py ................                                                                                                                                                               [ 29%]
tests/functional/test_uninstall.py ......................                                                                                                                                                    [ 30%]
tests/functional/test_uninstall_user.py ...                                                                                                                                                                  [ 30%]
tests/functional/test_vcs_bazaar.py s..                                                                                                                                                                      [ 31%]
tests/functional/test_vcs_git.py ........                                                                                                                                                                    [ 31%]
tests/functional/test_warning.py .                                                                                                                                                                           [ 31%]
tests/functional/test_wheel.py .................                                                                                                                                                             [ 32%]
tests/functional/test_yaml.py .........xx..x                                                                                                                                                                 [ 33%]
tests/lib/test_lib.py ..................                                                                                                                                                                     [ 35%]
tests/unit/test_appdirs.py ......................                                                                                                                                                            [ 36%]
tests/unit/test_base_command.py ......                                                                                                                                                                       [ 37%]
tests/unit/test_build_env.py .....                                                                                                                                                                           [ 37%]
tests/unit/test_cache.py ..                                                                                                                                                                                  [ 37%]
tests/unit/test_check.py ..                                                                                                                                                                                  [ 37%]
tests/unit/test_cmdoptions.py ...............                                                                                                                                                                [ 38%]
tests/unit/test_command_install.py ..                                                                                                                                                                        [ 38%]
tests/unit/test_compat.py ...................                                                                                                                                                                [ 40%]
tests/unit/test_configuration.py ......................                                                                                                                                                      [ 41%]
tests/unit/test_download.py ...............................s.............................                                                                                                                    [ 46%]
tests/unit/test_finder.py ..............................                                                                                                                                                     [ 48%]
tests/unit/test_format_control.py .........                                                                                                                                                                  [ 48%]
tests/unit/test_index.py ...................................................................................................................s.......                                                         [ 57%]
tests/unit/test_index_html_page.py .............                                                                                                                                                             [ 58%]
tests/unit/test_legacy_resolve.py .......                                                                                                                                                                    [ 58%]
tests/unit/test_link.py .....................                                                                                                                                                                [ 60%]
tests/unit/test_locations.py ...                                                                                                                                                                             [ 60%]
tests/unit/test_logging.py .............                                                                                                                                                                     [ 61%]
tests/unit/test_models.py .....                                                                                                                                                                              [ 61%]
tests/unit/test_options.py .......................................................                                                                                                                           [ 65%]
tests/unit/test_packaging.py ....                                                                                                                                                                            [ 65%]
tests/unit/test_pep425tags.py ........................                                                                                                                                                       [ 67%]
tests/unit/test_pep517.py .....                                                                                                                                                                              [ 68%]
tests/unit/test_req.py .........................................                                                                                                                                             [ 70%]
tests/unit/test_req_file.py ..............................................................                                                                                                                   [ 75%]
tests/unit/test_req_install.py .....                                                                                                                                                                         [ 75%]
tests/unit/test_req_uninstall.py ..........                                                                                                                                                                  [ 76%]
tests/unit/test_search_scope.py ..                                                                                                                                                                           [ 76%]
tests/unit/test_target_python.py ...................                                                                                                                                                         [ 77%]
tests/unit/test_unit_outdated.py ......                                                                                                                                                                      [ 78%]
tests/unit/test_utils.py ..............................................................................ss..............s................................................                                     [ 88%]
tests/unit/test_vcs.py s.................................................................................................                                                                                    [ 95%]
tests/unit/test_vcs_mercurial.py .                                                                                                                                                                           [ 95%]
tests/unit/test_wheel.py ....................................................................                                                                                                                [100%]
============================================================================================= short test summary info ==============================================================================================
SKIP [1] tests/functional/test_configuration.py:19: Can't modify underlying file for any mode
SKIP [1] tests/functional/test_install.py:531: condition: sys.version_info >= (3,4)
SKIP [1] tests/functional/test_requests.py:4: <Skipped instance>
SKIP [1] tests/functional/test_search.py:78: Warehouse search behavior is different and no longer returns multiple results. See https://github.com/pypa/warehouse/issues/3717 for more information.
SKIP [1] tests/functional/test_vcs_bazaar.py:15: Bazaar is only required under Travis
SKIP [1] tests/unit/test_download.py:310: condition: sys.platform != 'win32'
SKIP [1] tests/unit/test_index.py:863: condition: sys.platform != 'win32'
SKIP [2] tests/unit/test_utils.py:840: condition: sys.version_info >= (3,)
SKIP [1] tests/unit/test_utils.py:1148: condition: sys.platform != 'win32'
SKIP [1] tests/unit/test_vcs.py:23: Subversion is only required under Travis
XFAIL tests/functional/test_freeze.py::test_freeze_exclude_editable
XFAIL tests/functional/test_install_reqs.py::test_install_distribution_union_conflicting_extras
XFAIL tests/functional/test_yaml.py::test_yaml_based[install/conflicting_triangle]
XFAIL tests/functional/test_yaml.py::test_yaml_based[install/conflicting_diamond]
XFAIL tests/functional/test_yaml.py::test_yaml_based[install/extras-2]

================================================================================================= warnings summary =================================================================================================
/tmp/user/1000/tmp.F1f9ZebUlx/pip/.tox/py37/lib/python3.7/site-packages/pip/_internal/pep425tags.py:34: RuntimeWarning: I have the wrong path!
  warnings.warn("{}".format(e), RuntimeWarning)

/tmp/user/1000/tmp.F1f9ZebUlx/pip/.tox/py37/lib/python3.7/site-packages/pip/_internal/req/req_file.py:185: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options, opts)

-- Docs: https://docs.pytest.org/en/latest/warnings.html
========================================================================= 1406 passed, 11 skipped, 5 xfailed, 2 warnings in 496.51 seconds =========================================================================
_____________________________________________________________________________________________________ summary ______________________________________________________________________________________________________
  py37: commands succeeded
  congratulations :)
(.venv) $ git checkout -b other-master
Switched to a new branch 'other-master'
(.venv) $ git worktree add ../pip2 master
Preparing worktree (checking out 'master')
HEAD is now at 34621bf0 Merge pull request #6701 from pradyunsg/tests/remove-makedirs
(.venv) $ cd ../pip2
(.venv) $ tox -e py37
GLOB sdist-make: /tmp/user/1000/tmp.F1f9ZebUlx/pip2/setup.py
py37 create: /tmp/user/1000/tmp.F1f9ZebUlx/pip2/.tox/py37
py37 installdeps: -r/tmp/user/1000/tmp.F1f9ZebUlx/pip2/tools/tests-requirements.txt
py37 inst: /tmp/user/1000/tmp.F1f9ZebUlx/pip2/.tox/.tmp/package/1/pip-19.2.dev0.zip
py37 installed: apipkg==1.5,atomicwrites==1.3.0,attrs==19.1.0,coverage==4.5.3,execnet==1.6.0,freezegun==0.3.12,importlib-metadata==0.18,mock==3.0.5,more-itertools==7.1.0,pip==19.2.dev0,pluggy==0.12.0,pretend==1.0.9,py==1.8.0,pytest==3.8.2,pytest-cov==2.7.1,pytest-forked==1.0.2,pytest-rerunfailures==6.0,pytest-timeout==1.3.3,pytest-xdist==1.27.0,python-dateutil==2.8.0,PyYAML==5.1.1,scripttest==1.3,setuptools==41.0.1,six==1.12.0,virtualenv==16.6.1,wheel==0.33.4,zipp==0.5.2
py37 run-test-pre: PYTHONHASHSEED='2042751241'
py37 run-test-pre: commands[0] | python -c 'import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)' /tmp/user/1000/tmp.F1f9ZebUlx/pip2/tests/data/common_wheels
py37 run-test-pre: commands[1] | python /tmp/user/1000/tmp.F1f9ZebUlx/pip2/tools/tox_pip.py wheel -w /tmp/user/1000/tmp.F1f9ZebUlx/pip2/tests/data/common_wheels -r /tmp/user/1000/tmp.F1f9ZebUlx/pip2/tools/tests-common_wheels-requirements.txt
Collecting setuptools>=40.8.0 (from -r tools/tests-common_wheels-requirements.txt (line 8))
  Using cached https://files.pythonhosted.org/packages/ec/51/f45cea425fd5cb0b0380f5b0f048ebc1da5b417e48d304838c02d6288a1e/setuptools-41.0.1-py2.py3-none-any.whl
  Saved ./tests/data/common_wheels/setuptools-41.0.1-py2.py3-none-any.whl
Collecting wheel (from -r tools/tests-common_wheels-requirements.txt (line 9))
  Using cached https://files.pythonhosted.org/packages/bb/10/44230dd6bf3563b8f227dbf344c908d412ad2ff48066476672f3a72e174e/wheel-0.33.4-py2.py3-none-any.whl
  Saved ./tests/data/common_wheels/wheel-0.33.4-py2.py3-none-any.whl
Skipping setuptools, due to already being wheel.
Skipping wheel, due to already being wheel.
py37 run-test: commands[0] | pytest --timeout 300
=============================================================================================== test session starts ================================================================================================
platform linux -- Python 3.7.2, pytest-3.8.2, py-1.8.0, pluggy-0.12.0
rootdir: /tmp/user/1000/tmp.F1f9ZebUlx/pip2, inifile: setup.cfg
plugins: xdist-1.27.0, cov-2.7.1, rerunfailures-6.0, timeout-1.3.3, forked-1.0.2
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 1422 items

tests/functional/test_broken_stdout.py ...                                                                                                                                                                   [  0%]
tests/functional/test_check.py ..........                                                                                                                                                                    [  0%]
tests/functional/test_completion.py .....................                                                                                                                                                    [  2%]
tests/functional/test_configuration.py .s...                                                                                                                                                                 [  2%]
tests/functional/test_debug.py ...                                                                                                                                                                           [  2%]
tests/functional/test_download.py ..............................                                                                                                                                             [  5%]
tests/functional/test_freeze.py .F....x..............                                                                                                                                                        [  6%]
tests/functional/test_hash.py ...                                                                                                                                                                            [  6%]
tests/functional/test_help.py .......                                                                                                                                                                        [  7%]
tests/functional/test_install.py .........................................s..........................................................                                                                        [ 14%]
tests/functional/test_install_check.py ..                                                                                                                                                                    [ 14%]
tests/functional/test_install_cleanup.py ........                                                                                                                                                            [ 14%]
tests/functional/test_install_compat.py ..                                                                                                                                                                   [ 15%]
tests/functional/test_install_config.py ........                                                                                                                                                             [ 15%]
tests/functional/test_install_extras.py .......                                                                                                                                                              [ 16%]
tests/functional/test_install_force_reinstall.py ..                                                                                                                                                          [ 16%]
tests/functional/test_install_index.py ....                                                                                                                                                                  [ 16%]
tests/functional/test_install_reqs.py ..............................x...                                                                                                                                     [ 18%]
tests/functional/test_install_upgrade.py ...................                                                                                                                                                 [ 20%]
tests/functional/test_install_user.py .........                                                                                                                                                              [ 20%]
tests/functional/test_install_vcs_git.py ......................                                                                                                                                              [ 22%]
tests/functional/test_install_wheel.py .........................                                                                                                                                             [ 24%]
tests/functional/test_list.py ............................                                                                                                                                                   [ 26%]
tests/functional/test_no_color.py .                                                                                                                                                                          [ 26%]
tests/functional/test_pep517.py ...........                                                                                                                                                                  [ 27%]
tests/functional/test_requests.py s                                                                                                                                                                          [ 27%]
tests/functional/test_search.py ...s.......                                                                                                                                                                  [ 27%]
tests/functional/test_show.py ................                                                                                                                                                               [ 29%]
tests/functional/test_uninstall.py ......................                                                                                                                                                    [ 30%]
tests/functional/test_uninstall_user.py ...                                                                                                                                                                  [ 30%]
tests/functional/test_vcs_bazaar.py s..                                                                                                                                                                      [ 31%]
tests/functional/test_vcs_git.py ........                                                                                                                                                                    [ 31%]
tests/functional/test_warning.py .                                                                                                                                                                           [ 31%]
tests/functional/test_wheel.py .................                                                                                                                                                             [ 32%]
tests/functional/test_yaml.py .........xx..x                                                                                                                                                                 [ 33%]
tests/lib/test_lib.py ..................                                                                                                                                                                     [ 35%]
tests/unit/test_appdirs.py ......................                                                                                                                                                            [ 36%]
tests/unit/test_base_command.py ......                                                                                                                                                                       [ 37%]
tests/unit/test_build_env.py .....                                                                                                                                                                           [ 37%]
tests/unit/test_cache.py ..                                                                                                                                                                                  [ 37%]
tests/unit/test_check.py ..                                                                                                                                                                                  [ 37%]
tests/unit/test_cmdoptions.py ...............                                                                                                                                                                [ 38%]
tests/unit/test_command_install.py ..                                                                                                                                                                        [ 38%]
tests/unit/test_compat.py ...................                                                                                                                                                                [ 40%]
tests/unit/test_configuration.py ......................                                                                                                                                                      [ 41%]
tests/unit/test_download.py ...............................s.............................                                                                                                                    [ 46%]
tests/unit/test_finder.py ..............................                                                                                                                                                     [ 48%]
tests/unit/test_format_control.py .........                                                                                                                                                                  [ 48%]
tests/unit/test_index.py ...................................................................................................................s.......                                                         [ 57%]
tests/unit/test_index_html_page.py .............                                                                                                                                                             [ 58%]
tests/unit/test_legacy_resolve.py .......                                                                                                                                                                    [ 58%]
tests/unit/test_link.py .....................                                                                                                                                                                [ 60%]
tests/unit/test_locations.py ...                                                                                                                                                                             [ 60%]
tests/unit/test_logging.py .............                                                                                                                                                                     [ 61%]
tests/unit/test_models.py .....                                                                                                                                                                              [ 61%]
tests/unit/test_options.py .......................................................                                                                                                                           [ 65%]
tests/unit/test_packaging.py ....                                                                                                                                                                            [ 65%]
tests/unit/test_pep425tags.py ........................                                                                                                                                                       [ 67%]
tests/unit/test_pep517.py .....                                                                                                                                                                              [ 68%]
tests/unit/test_req.py .........................................                                                                                                                                             [ 70%]
tests/unit/test_req_file.py ..............................................................                                                                                                                   [ 75%]
tests/unit/test_req_install.py .....                                                                                                                                                                         [ 75%]
tests/unit/test_req_uninstall.py ..........                                                                                                                                                                  [ 76%]
tests/unit/test_search_scope.py ..                                                                                                                                                                           [ 76%]
tests/unit/test_target_python.py ...................                                                                                                                                                         [ 77%]
tests/unit/test_unit_outdated.py ......                                                                                                                                                                      [ 78%]
tests/unit/test_utils.py ..............................................................................ss..............s................................................                                     [ 88%]
tests/unit/test_vcs.py s.....................F...........................................................................                                                                                    [ 95%]
tests/unit/test_vcs_mercurial.py .                                                                                                                                                                           [ 95%]
tests/unit/test_wheel.py ....................................................................                                                                                                                [100%]

===================================================================================================== FAILURES =====================================================================================================
_______________________________________________________________________________________________ test_freeze_with_pip _______________________________________________________________________________________________

script = <tests.lib.PipTestEnvironment object at 0x7f66cc692518>

    def test_freeze_with_pip(script):
        """Test pip shows itself"""
        result = script.pip('freeze', '--all')
>       assert 'pip==' in result.stdout
E       AssertionError: assert 'pip==' in '-e git+https://github.com/pypa/pip.git@34621bf0087c1fa8e2b72807f6704e589c20821c#egg=pip&subdirectory=../../../../pyte...install with no version control (setuptools==41.0.1)\n-e /tmp/user/1000/pytest-of-chris/pytest-2/setuptools0/install\n'
E        +  where '-e git+https://github.com/pypa/pip.git@34621bf0087c1fa8e2b72807f6704e589c20821c#egg=pip&subdirectory=../../../../pyte...install with no version control (setuptools==41.0.1)\n-e /tmp/user/1000/pytest-of-chris/pytest-2/setuptools0/install\n' = <tests.lib.TestPipResult object at 0x7f66cc692668>.stdout

tests/functional/test_freeze.py:73: AssertionError
__________________________________________________________________________________________ test_git_get_src_requirements ___________________________________________________________________________________________

mock_get_remote_url = <MagicMock name='get_remote_url' id='140079463359096'>, mock_get_revision = <MagicMock name='get_revision' id='140079469462248'>

    @patch('pip._internal.vcs.git.Git.get_revision')
    @patch('pip._internal.vcs.git.Git.get_remote_url')
    @pytest.mark.network
    def test_git_get_src_requirements(mock_get_remote_url, mock_get_revision):
        git_url = 'https://github.com/pypa/pip-test-package'
        sha = '5547fa909e83df8bd743d3978d6667497983a4b7'

        mock_get_remote_url.return_value = git_url
        mock_get_revision.return_value = sha

        ret = Git.get_src_requirement('.', 'pip-test-package')

>       assert ret == (
            'git+https://github.com/pypa/pip-test-package'
            '@5547fa909e83df8bd743d3978d6667497983a4b7#egg=pip_test_package'
        )
E       AssertionError: assert 'git+https://...../../../pip2' == 'git+https://g..._test_package'
E         Skipping 95 identical leading characters in diff, use -v to show
E         - est_package&subdirectory=../../../pip2
E         + est_package

tests/unit/test_vcs.py:138: AssertionError
============================================================================================= short test summary info ==============================================================================================
FAIL tests/functional/test_freeze.py::test_freeze_with_pip
FAIL tests/unit/test_vcs.py::test_git_get_src_requirements
SKIP [1] tests/functional/test_configuration.py:19: Can't modify underlying file for any mode
SKIP [1] tests/functional/test_install.py:531: condition: sys.version_info >= (3,4)
SKIP [1] tests/functional/test_requests.py:4: <Skipped instance>
SKIP [1] tests/functional/test_search.py:78: Warehouse search behavior is different and no longer returns multiple results. See https://github.com/pypa/warehouse/issues/3717 for more information.
SKIP [1] tests/functional/test_vcs_bazaar.py:15: Bazaar is only required under Travis
SKIP [1] tests/unit/test_download.py:310: condition: sys.platform != 'win32'
SKIP [1] tests/unit/test_index.py:863: condition: sys.platform != 'win32'
SKIP [2] tests/unit/test_utils.py:840: condition: sys.version_info >= (3,)
SKIP [1] tests/unit/test_utils.py:1148: condition: sys.platform != 'win32'
SKIP [1] tests/unit/test_vcs.py:23: Subversion is only required under Travis
XFAIL tests/functional/test_freeze.py::test_freeze_exclude_editable
XFAIL tests/functional/test_install_reqs.py::test_install_distribution_union_conflicting_extras
XFAIL tests/functional/test_yaml.py::test_yaml_based[install/conflicting_triangle]
XFAIL tests/functional/test_yaml.py::test_yaml_based[install/conflicting_diamond]
XFAIL tests/functional/test_yaml.py::test_yaml_based[install/extras-2]
================================================================================================= warnings summary =================================================================================================
/tmp/user/1000/tmp.F1f9ZebUlx/pip2/.tox/py37/lib/python3.7/site-packages/pip/_internal/pep425tags.py:34: RuntimeWarning: I have the wrong path!
  warnings.warn("{}".format(e), RuntimeWarning)

/tmp/user/1000/tmp.F1f9ZebUlx/pip2/.tox/py37/lib/python3.7/site-packages/pip/_internal/req/req_file.py:185: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options, opts)

-- Docs: https://docs.pytest.org/en/latest/warnings.html
==================================================================== 2 failed, 1404 passed, 11 skipped, 5 xfailed, 2 warnings in 499.97 seconds ====================================================================
ERROR: InvocationError for command /tmp/user/1000/tmp.F1f9ZebUlx/pip2/.tox/py37/bin/pytest --timeout 300 (exited with code 1)
_____________________________________________________________________________________________________ summary ______________________________________________________________________________________________________
ERROR:   py37: commands failed
Failed Test Output
_______________________________________________________________________________________________ test_freeze_with_pip _______________________________________________________________________________________________

script = <tests.lib.PipTestEnvironment object at 0x7f66cc692518>

    def test_freeze_with_pip(script):
        """Test pip shows itself"""
        result = script.pip('freeze', '--all')
>       assert 'pip==' in result.stdout
E       AssertionError: assert 'pip==' in '-e git+https://github.com/pypa/pip.git@34621bf0087c1fa8e2b72807f6704e589c20821c#egg=pip&subdirectory=../../../../pyte...install with no version control (setuptools==41.0.1)\n-e /tmp/user/1000/pytest-of-chris/pytest-2/setuptools0/install\n'
E        +  where '-e git+https://github.com/pypa/pip.git@34621bf0087c1fa8e2b72807f6704e589c20821c#egg=pip&subdirectory=../../../../pyte...install with no version control (setuptools==41.0.1)\n-e /tmp/user/1000/pytest-of-chris/pytest-2/setuptools0/install\n' = <tests.lib.TestPipResult object at 0x7f66cc692668>.stdout

tests/functional/test_freeze.py:73: AssertionError
__________________________________________________________________________________________ test_git_get_src_requirements ___________________________________________________________________________________________

mock_get_remote_url = <MagicMock name='get_remote_url' id='140079463359096'>, mock_get_revision = <MagicMock name='get_revision' id='140079469462248'>

    @patch('pip._internal.vcs.git.Git.get_revision')
    @patch('pip._internal.vcs.git.Git.get_remote_url')
    @pytest.mark.network
    def test_git_get_src_requirements(mock_get_remote_url, mock_get_revision):
        git_url = 'https://github.com/pypa/pip-test-package'
        sha = '5547fa909e83df8bd743d3978d6667497983a4b7'

        mock_get_remote_url.return_value = git_url
        mock_get_revision.return_value = sha

        ret = Git.get_src_requirement('.', 'pip-test-package')

>       assert ret == (
            'git+https://github.com/pypa/pip-test-package'
            '@5547fa909e83df8bd743d3978d6667497983a4b7#egg=pip_test_package'
        )
E       AssertionError: assert 'git+https://...../../../pip2' == 'git+https://g..._test_package'
E         Skipping 95 identical leading characters in diff, use -v to show
E         - est_package&subdirectory=../../../pip2
E         + est_package

tests/unit/test_vcs.py:138: AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: testsTesting and related thingsauto-lockedOutdated issues that have been locked by automationtype: bugA confirmed bug or unintended behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions