1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Parametrize test_install_package_to_usersite_with_target_must_fail

This commit is contained in:
Devesh Kumar Singh 2020-05-16 13:27:37 +05:30
parent 7a60395dbd
commit 208282af98

View file

@ -885,21 +885,16 @@ def test_install_package_with_target(script):
assert singlemodule_py in result.files_updated, str(result)
def test_install_package_to_usersite_with_target_must_fail(script):
@pytest.mark.parametrize("target_option", ['--target', '-t'])
def test_install_package_to_usersite_with_target_must_fail(script,
target_option):
"""
Test that installing package to usersite with target
must raise error
"""
target_dir = script.scratch_path / 'target'
result = script.pip_install_local(
'--user', '-t', target_dir, "simple==1.0", expect_error=True
)
assert "Can not combine '--user' and '--target'" in result.stderr, (
str(result)
)
result = script.pip_install_local(
'--user', '--target', target_dir, "simple==1.0", expect_error=True
'--user', target_option, target_dir, "simple==1.0", expect_error=True
)
assert "Can not combine '--user' and '--target'" in result.stderr, (
str(result)