Skip to content

Commit 443fb1d

Browse files
committed
Fix test_runner_work_in_environments_with_no_pip to work under --use-zipapp
1 parent 662f940 commit 443fb1d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/functional/test_pip_runner_script.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ def test_runner_work_in_environments_with_no_pip(
1212

1313
# Ensure there's no pip installed in the environment
1414
script.pip("uninstall", "pip", "--yes", use_module=True)
15-
script.pip("--version", expect_error=True)
15+
# We don't use script.pip to check here, as when testing a
16+
# zipapp, script.pip will run pip from the zipapp.
17+
script.run(["python", "-c", "import pip"], expect_error=True)
1618

1719
# The runner script should still invoke a usable pip
1820
result = script.run("python", os.fspath(runner), "--version")

0 commit comments

Comments
 (0)