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

gh-115538: Use pathlib to compare prefixes in test_venv (GH-117076)
(cherry picked from commit 52f5b7f9e0)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2024-04-02 15:29:32 +02:00 committed by GitHub
parent 52f1fb6f7d
commit 75b3139b53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -252,7 +252,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):