summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAN Long <aisk@users.noreply.github.com>2024-04-02 13:10:24 (GMT)
committerGitHub <noreply@github.com>2024-04-02 13:10:24 (GMT)
commit52f5b7f9e05fc4a25e385c046e0b091641674556 (patch)
tree26fec51bd7e6ac241d5b3ca66674a0c71246a16a
parente3b6f287fc5d195859c29661145873c638c6dc83 (diff)
downloadcpython-52f5b7f9e05fc4a25e385c046e0b091641674556.zip
cpython-52f5b7f9e05fc4a25e385c046e0b091641674556.tar.gz
cpython-52f5b7f9e05fc4a25e385c046e0b091641674556.tar.bz2
gh-115538: Use pathlib to compare prefixes in test_venv (GH-117076)
-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 63cc4b7..f410ce7 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):