]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-115538: Use pathlib to compare prefixes in test_venv (GH-117076)
authorAN Long <aisk@users.noreply.github.com>
Tue, 2 Apr 2024 13:10:24 +0000 (21:10 +0800)
committerGitHub <noreply@github.com>
Tue, 2 Apr 2024 13:10:24 +0000 (14:10 +0100)
Lib/test/test_venv.py

index 63cc4b743862bc988640d03ccc21e1caa947f0ce..f410ce7198dc86b42a4be37a72718f7ff64e51ba 100644 (file)
@@ -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):