From e0999ca55cec4ec1ebfaf4c220b8c50a26a2ebff Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Fri, 8 Oct 2021 18:14:44 +0100 Subject: [PATCH] Don't use `python -m pip` for checking pip.exe protections --- tests/functional/test_install_upgrade.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/functional/test_install_upgrade.py b/tests/functional/test_install_upgrade.py index a247af6a386..7a72db0bc4e 100644 --- a/tests/functional/test_install_upgrade.py +++ b/tests/functional/test_install_upgrade.py @@ -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)