summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-04-02 13:29:32 (GMT)
committerGitHub <noreply@github.com>2024-04-02 13:29:32 (GMT)
commit75b3139b53ea0377ae0e933985ee86c8f6ad5a6c (patch)
treeff0b8d2089c47e36613b2add35dbf83377bd3833
parent52f1fb6f7dba31ccbe28f555f199c7d29f137581 (diff)
downloadcpython-75b3139b53ea0377ae0e933985ee86c8f6ad5a6c.zip
cpython-75b3139b53ea0377ae0e933985ee86c8f6ad5a6c.tar.gz
cpython-75b3139b53ea0377ae0e933985ee86c8f6ad5a6c.tar.bz2
[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 52f5b7f9e05fc4a25e385c046e0b091641674556) Co-authored-by: AN Long <aisk@users.noreply.github.com>
-rw-r--r--Lib/test/test_venv.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index 7540be2..2f44176 100644
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -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):