summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-10-07 19:22:28 (GMT)
committerGitHub <noreply@github.com>2021-10-07 19:22:28 (GMT)
commit768aaf6c433e6a13b82c7bdebd0062c7472c1fc7 (patch)
tree33e46032c27cef3b374a10d40e0b4c6a90b30a19 /Lib/test
parentff8859d965815e8b5af346bd90299cfa5568c855 (diff)
downloadcpython-768aaf6c433e6a13b82c7bdebd0062c7472c1fc7.zip
cpython-768aaf6c433e6a13b82c7bdebd0062c7472c1fc7.tar.gz
cpython-768aaf6c433e6a13b82c7bdebd0062c7472c1fc7.tar.bz2
bpo-45403: Fix test_sys.test_stdlib_dir() (GH-28785)
Fix test_sys.test_stdlib_dir() when Python is built outside the source tree: compare normalized paths.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_sys.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index cf70840..6720cd6 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -1001,8 +1001,8 @@ class SysModuleTest(unittest.TestCase):
if marker and not os.path.exists(marker):
marker = None
expected = os.path.dirname(marker) if marker else None
- actual = sys._stdlib_dir
- self.assertEqual(actual, expected)
+ self.assertEqual(os.path.normpath(sys._stdlib_dir),
+ os.path.normpath(expected))
@test.support.cpython_only