Skip to content

Commit

Permalink
tests: functional: Add uninstall test for --install-option bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Gorny committed Mar 7, 2021
1 parent a81b83f commit 9945b2d
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/functional/test_uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,35 @@ def test_uninstall_from_reqs_file(script, tmpdir):
)


def test_uninstall_per_setup_options(script):
"""
Check that uninstall works with per-setup options are specified
"""
pkg_name = 'pkga'
pkga_path = create_test_package_with_setup(
script,
name=pkg_name, version='1.0',
)
script.scratch_path.joinpath("test-req.txt").write_text(
textwrap.dedent(f"""
{pkg_name} --install-option="-v"
""")
)

result = script.pip('install', pkga_path)
result2 = script.pip('uninstall', '-r', 'test-req.txt', '-y')
assert_all_changes(
result,
result2,
[
script.venv / 'build',
script.venv / 'src',
script.scratch / 'test-req.txt',
script.site_packages / 'easy-install.pth',
],
)


def test_uninstallpathset_no_paths(caplog):
"""
Test UninstallPathSet logs notification when there are no paths to
Expand Down

0 comments on commit 9945b2d

Please sign in to comment.