mirror of https://github.com/pypa/pip
Fix some more tests which build packages from source
This commit is contained in:
parent
61f89c5e80
commit
9c7ed29009
|
@ -495,13 +495,17 @@ def test_freeze_with_requirement_option_multiple(script):
|
|||
assert result.stdout.count("--index-url http://ignore") == 1
|
||||
|
||||
|
||||
def test_freeze_user(script, virtualenv):
|
||||
@pytest.mark.network
|
||||
def test_freeze_user(script, virtualenv, data):
|
||||
"""
|
||||
Testing freeze with --user, first we have to install some stuff.
|
||||
"""
|
||||
script.pip('download', 'setuptools', 'wheel', '-d', data.packages)
|
||||
virtualenv.system_site_packages = True
|
||||
script.pip_install_local('--user', 'simple==2.0')
|
||||
script.pip_install_local('simple2==3.0')
|
||||
script.pip_install_local('--find-links', data.find_links,
|
||||
'--user', 'simple==2.0')
|
||||
script.pip_install_local('--find-links', data.find_links,
|
||||
'simple2==3.0')
|
||||
result = script.pip('freeze', '--user', expect_stderr=True)
|
||||
expected = textwrap.dedent("""\
|
||||
simple==2.0
|
||||
|
|
|
@ -104,12 +104,14 @@ def test_local_legacy_flag(script, data):
|
|||
assert 'simple (1.0)' in result.stdout
|
||||
|
||||
|
||||
@pytest.mark.network
|
||||
def test_user_flag(script, data, virtualenv):
|
||||
"""
|
||||
Test the behavior of --user flag in the list command
|
||||
|
||||
"""
|
||||
virtualenv.system_site_packages = True
|
||||
script.pip('download', 'setuptools', 'wheel', '-d', data.packages)
|
||||
script.pip('install', '-f', data.find_links, '--no-index', 'simple==1.0')
|
||||
script.pip('install', '-f', data.find_links, '--no-index',
|
||||
'--user', 'simple2==2.0')
|
||||
|
@ -119,12 +121,14 @@ def test_user_flag(script, data, virtualenv):
|
|||
assert {"name": "simple2", "version": "2.0"} in json.loads(result.stdout)
|
||||
|
||||
|
||||
@pytest.mark.network
|
||||
def test_user_columns_flag(script, data, virtualenv):
|
||||
"""
|
||||
Test the behavior of --user --format=columns flags in the list command
|
||||
|
||||
"""
|
||||
virtualenv.system_site_packages = True
|
||||
script.pip('download', 'setuptools', 'wheel', '-d', data.packages)
|
||||
script.pip('install', '-f', data.find_links, '--no-index', 'simple==1.0')
|
||||
script.pip('install', '-f', data.find_links, '--no-index',
|
||||
'--user', 'simple2==2.0')
|
||||
|
@ -135,12 +139,14 @@ def test_user_columns_flag(script, data, virtualenv):
|
|||
assert 'simple2 2.0' in result.stdout, str(result)
|
||||
|
||||
|
||||
@pytest.mark.network
|
||||
def test_user_legacy(script, data, virtualenv):
|
||||
"""
|
||||
Test the behavior of --user flag in the list command
|
||||
|
||||
"""
|
||||
virtualenv.system_site_packages = True
|
||||
script.pip('download', 'setuptools', 'wheel', '-d', data.packages)
|
||||
script.pip('install', '-f', data.find_links, '--no-index', 'simple==1.0')
|
||||
script.pip('install', '-f', data.find_links, '--no-index',
|
||||
'--user', 'simple2==2.0')
|
||||
|
|
Loading…
Reference in New Issue