Skip to content

Commit 03d9ad8

Browse files
committed
Fix ensurepip tests to match new --executable argument behavior
Update test expectations in test_ensurepip.py to account for the new --executable argument that gets added when using --prefix or --root options. The implementation now correctly sets the executable path when installing with a custom prefix, but the tests weren't updated to expect this additional argument. - test_bootstrapping_with_root: expect --prefix "/" and --executable - test_bootstrapping_with_prefix: expect --executable argument
1 parent 1fd580f commit 03d9ad8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/test/test_ensurepip.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ def test_bootstrapping_with_root(self):
9494
self.run_pip.assert_called_once_with(
9595
[
9696
"install", "--no-cache-dir", "--no-index", "--find-links",
97-
unittest.mock.ANY, "--root", "/foo/bar/", "--prefix", unittest.mock.ANY,
97+
unittest.mock.ANY, "--root", "/foo/bar/", "--prefix", "/",
98+
"--executable", unittest.mock.ANY,
9899
"pip",
99100
],
100101
unittest.mock.ANY,
@@ -105,7 +106,8 @@ def test_bootstrapping_with_prefix(self):
105106
self.run_pip.assert_called_once_with(
106107
[
107108
"install", "--no-cache-dir", "--no-index", "--find-links",
108-
unittest.mock.ANY, "--prefix", "/foo/bar/", "pip",
109+
unittest.mock.ANY, "--prefix", "/foo/bar/",
110+
"--executable", unittest.mock.ANY, "pip",
109111
],
110112
unittest.mock.ANY,
111113
)

0 commit comments

Comments
 (0)