mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Add tests to verify --index-url behaviour
This commit is contained in:
parent
4c70c6d350
commit
ac65f136fd
1 changed files with 24 additions and 0 deletions
|
@ -1769,6 +1769,30 @@ def test_ignore_yanked_file(script, data):
|
|||
assert 'Successfully installed simple-2.0\n' in result.stdout, str(result)
|
||||
|
||||
|
||||
def test_invalid_index_url_argument(script):
|
||||
"""
|
||||
Test the behaviour of an invalid --index-url argument
|
||||
"""
|
||||
|
||||
result = script.pip('install', '--index-url', '--user',
|
||||
TestPyPI.simple_url, 'simple',
|
||||
expect_error=True)
|
||||
|
||||
assert 'WARNING: index-url --user is invalid.' in \
|
||||
result.stderr, str(result)
|
||||
|
||||
|
||||
def test_valid_index_url_argument(script):
|
||||
"""
|
||||
Test the behaviour of an valid --index-url argument
|
||||
"""
|
||||
|
||||
result = script.pip('install', '--no-deps', '--index-url',
|
||||
TestPyPI.simple_url, 'simple')
|
||||
|
||||
assert 'Successfully installed simple' in result.stdout, str(result)
|
||||
|
||||
|
||||
def test_install_yanked_file_and_print_warning(script, data):
|
||||
"""
|
||||
Test install a "yanked" file and print a warning.
|
||||
|
|
Loading…
Reference in a new issue