From: AN Long Date: Tue, 2 Apr 2024 13:10:24 +0000 (+0800) Subject: gh-115538: Use pathlib to compare prefixes in test_venv (GH-117076) X-Git-Tag: v3.13.0a6~75 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=52f5b7f9e05fc4a25e385c046e0b091641674556;p=thirdparty%2FPython%2Fcpython.git gh-115538: Use pathlib to compare prefixes in test_venv (GH-117076) --- diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py index 63cc4b743862..f410ce7198dc 100644 --- a/Lib/test/test_venv.py +++ b/Lib/test/test_venv.py @@ -273,7 +273,8 @@ class BasicTest(BaseTest): ('base_exec_prefix', sys.base_exec_prefix)): cmd[2] = 'import sys; print(sys.%s)' % prefix out, err = check_output(cmd) - self.assertEqual(out.strip(), expected.encode(), prefix) + self.assertEqual(pathlib.Path(out.strip().decode()), + pathlib.Path(expected), prefix) @requireVenvCreate def test_sysconfig(self):