gh-115538: Use pathlib to compare prefixes in test_venv (GH-117076)

This commit is contained in:
AN Long 2024-04-02 21:10:24 +08:00 committed by GitHub
parent e3b6f287fc
commit 52f5b7f9e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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):