Skip to content

Commit e040e0f

Browse files
author
Noah Gorny
committed
tests: functional: Add uninstall test for --install-option bug
1 parent a6cde8c commit e040e0f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

tests/functional/test_uninstall.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,35 @@ def test_uninstall_from_reqs_file(script, tmpdir):
411411
)
412412

413413

414+
def test_uninstall_per_setup_options(script):
415+
"""
416+
Check that uninstall works with per-setup options are specified
417+
"""
418+
pkg_name = 'pkga'
419+
pkga_path = create_test_package_with_setup(
420+
script,
421+
name=pkg_name, version='1.0',
422+
)
423+
script.scratch_path.joinpath("test-req.txt").write_text(
424+
textwrap.dedent(f"""
425+
{pkg_name} --install-option="-v"
426+
""")
427+
)
428+
429+
result = script.pip('install', pkga_path)
430+
result2 = script.pip('uninstall', '-r', 'test-req.txt', '-y')
431+
assert_all_changes(
432+
result,
433+
result2,
434+
[
435+
script.venv / 'build',
436+
script.venv / 'src',
437+
script.scratch / 'test-req.txt',
438+
script.site_packages / 'easy-install.pth',
439+
],
440+
)
441+
442+
414443
def test_uninstallpathset_no_paths(caplog):
415444
"""
416445
Test UninstallPathSet logs notification when there are no paths to

0 commit comments

Comments
 (0)