Skip to content

Commit 7a29922

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 50c98f1 commit 7a29922

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Lib/test/test_ensurepip.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ def test_bootstrapping_with_root(self):
115115
self.run_pip.assert_called_once_with(
116116
[
117117
"install", "--no-cache-dir", "--no-index", "--find-links",
118-
unittest.mock.ANY, "--root", "/foo/bar/", *COMPILE_OPT,
118+
unittest.mock.ANY, "--root", "/foo/bar/", "--prefix", "/",
119+
"--executable", unittest.mock.ANY, *COMPILE_OPT,
119120
"pip",
120121
],
121122
unittest.mock.ANY,
@@ -126,7 +127,8 @@ def test_bootstrapping_with_prefix(self):
126127
self.run_pip.assert_called_once_with(
127128
[
128129
"install", "--no-cache-dir", "--no-index", "--find-links",
129-
unittest.mock.ANY, "--prefix", "/foo/bar/", "pip",
130+
unittest.mock.ANY, "--prefix", "/foo/bar/",
131+
"--executable", unittest.mock.ANY, "pip",
130132
],
131133
unittest.mock.ANY,
132134
)

0 commit comments

Comments
 (0)