diff --git a/tests/functional/test_list.py b/tests/functional/test_list.py index 16b725ddee7..764d326f7b8 100644 --- a/tests/functional/test_list.py +++ b/tests/functional/test_list.py @@ -513,11 +513,10 @@ def test_list_path(tmpdir, script, data): Test list with --path. """ result = script.pip('list', '--path', tmpdir, '--format=json') - assert {'name': 'simple', - 'version': '2.0'} not in json.loads(result.stdout) + json_result = json.loads(result.stdout) + assert {'name': 'simple', 'version': '2.0'} not in json_result - script.pip('install', '--find-links', data.find_links, - '--target', tmpdir, 'simple==2.0') + script.pip_install_local('--target', tmpdir, 'simple==2.0') result = script.pip('list', '--path', tmpdir, '--format=json') json_result = json.loads(result.stdout) assert {'name': 'simple', 'version': '2.0'} in json_result @@ -528,10 +527,9 @@ def test_list_path_exclude_user(tmpdir, script, data): Test list with --path and make sure packages from --user are not picked up. """ - script.pip_install_local('--find-links', data.find_links, - '--user', 'simple2') - script.pip('install', '--find-links', data.find_links, - '--target', tmpdir, 'simple==1.0') + script.pip_install_local('--user', 'simple2') + script.pip_install_local('--target', tmpdir, 'simple==1.0') + result = script.pip('list', '--user', '--format=json') json_result = json.loads(result.stdout) assert {'name': 'simple2', 'version': '3.0'} in json_result @@ -549,10 +547,10 @@ def test_list_path_multiple(tmpdir, script, data): os.mkdir(path1) path2 = tmpdir / "path2" os.mkdir(path2) - script.pip('install', '--find-links', data.find_links, - '--target', path1, 'simple==2.0') - script.pip('install', '--find-links', data.find_links, - '--target', path2, 'simple2==3.0') + + script.pip_install_local('--target', path1, 'simple==2.0') + script.pip_install_local('--target', path2, 'simple2==3.0') + result = script.pip('list', '--path', path1, '--format=json') json_result = json.loads(result.stdout) assert {'name': 'simple', 'version': '2.0'} in json_result diff --git a/tests/functional/test_pep517.py b/tests/functional/test_pep517.py index 6abbad5d072..c71d1a40102 100644 --- a/tests/functional/test_pep517.py +++ b/tests/functional/test_pep517.py @@ -1,3 +1,4 @@ +import pytest from pip._vendor import pytoml from pip._internal.build_env import BuildEnvironment @@ -198,6 +199,7 @@ def test_explicit_setuptools_backend(script, tmpdir, data, common_wheels): result.assert_installed(name, editable=False) +@pytest.mark.network def test_pep517_and_build_options(script, tmpdir, data, common_wheels): """Backend generated requirements are installed in the build env""" project_dir, name = make_pyproject_with_setup(tmpdir)