summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2022-10-14 15:58:54 (GMT)
committerGitHub <noreply@github.com>2022-10-14 15:58:54 (GMT)
commit2fe44f728afa2dd506c304641f0481d6813d1dbd (patch)
tree9d0bd27e55b44fb99d57657881a0abd110e2cab9 /Lib/test
parentb863b9cd4b8681cf5fff5f121837a1039045783f (diff)
downloadcpython-2fe44f728afa2dd506c304641f0481d6813d1dbd.zip
cpython-2fe44f728afa2dd506c304641f0481d6813d1dbd.tar.gz
cpython-2fe44f728afa2dd506c304641f0481d6813d1dbd.tar.bz2
gh-98251: Allow venv to pass along PYTHON* variables to pip and ensurepip when they do not impact path resolution (GH-98259)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_venv.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index 4359a4e..b355b00 100644
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -216,7 +216,7 @@ class BasicTest(BaseTest):
if sys.platform == 'win32':
expect_exe = os.path.normcase(os.path.realpath(expect_exe))
- def pip_cmd_checker(cmd):
+ def pip_cmd_checker(cmd, **kwargs):
cmd[0] = os.path.normcase(cmd[0])
self.assertEqual(
cmd,
@@ -232,7 +232,7 @@ class BasicTest(BaseTest):
)
fake_context = builder.ensure_directories(fake_env_dir)
- with patch('venv.subprocess.check_call', pip_cmd_checker):
+ with patch('venv.subprocess.check_output', pip_cmd_checker):
builder.upgrade_dependencies(fake_context)
@requireVenvCreate
@@ -659,8 +659,8 @@ class EnsurePipTest(BaseTest):
try:
yield
except subprocess.CalledProcessError as exc:
- out = exc.output.decode(errors="replace")
- err = exc.stderr.decode(errors="replace")
+ out = (exc.output or b'').decode(errors="replace")
+ err = (exc.stderr or b'').decode(errors="replace")
self.fail(
f"{exc}\n\n"
f"**Subprocess Output**\n{out}\n\n"