Skip to content

Commit 9945b2d

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

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
@@ -422,6 +422,35 @@ def test_uninstall_from_reqs_file(script, tmpdir):
422422
)
423423

424424

425+
def test_uninstall_per_setup_options(script):
426+
"""
427+
Check that uninstall works with per-setup options are specified
428+
"""
429+
pkg_name = 'pkga'
430+
pkga_path = create_test_package_with_setup(
431+
script,
432+
name=pkg_name, version='1.0',
433+
)
434+
script.scratch_path.joinpath("test-req.txt").write_text(
435+
textwrap.dedent(f"""
436+
{pkg_name} --install-option="-v"
437+
""")
438+
)
439+
440+
result = script.pip('install', pkga_path)
441+
result2 = script.pip('uninstall', '-r', 'test-req.txt', '-y')
442+
assert_all_changes(
443+
result,
444+
result2,
445+
[
446+
script.venv / 'build',
447+
script.venv / 'src',
448+
script.scratch / 'test-req.txt',
449+
script.site_packages / 'easy-install.pth',
450+
],
451+
)
452+
453+
425454
def test_uninstallpathset_no_paths(caplog):
426455
"""
427456
Test UninstallPathSet logs notification when there are no paths to

0 commit comments

Comments
 (0)