Skip to content

Commit

Permalink
Don't use python -m pip for checking pip.exe protections
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Oct 8, 2021
1 parent cf05595 commit e0999ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/functional/test_install_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,9 @@ def test_install_find_existing_package_canonicalize(script, req1, req2):
@pytest.mark.network
@pytest.mark.skipif(sys.platform != "win32", reason="Windows-only test")
def test_modifying_pip_presents_error(script):
result = script.pip("install", "pip", "--force-reinstall", expect_error=True)
result = script.pip(
"install", "pip", "--force-reinstall", use_module=False, expect_error=True
)

assert "python.exe" in result.stderr, str(result)
assert " -m " in result.stderr, str(result)

0 comments on commit e0999ca

Please sign in to comment.