There was an error while loading. Please reload this page.
1 parent ff8859d commit 768aaf6Copy full SHA for 768aaf6
2 files changed
Lib/test/test_sys.py
@@ -1001,8 +1001,8 @@ def test_stdlib_dir(self):
1001
if marker and not os.path.exists(marker):
1002
marker = None
1003
expected = os.path.dirname(marker) if marker else None
1004
- actual = sys._stdlib_dir
1005
- self.assertEqual(actual, expected)
+ self.assertEqual(os.path.normpath(sys._stdlib_dir),
+ os.path.normpath(expected))
1006
1007
1008
@test.support.cpython_only
Misc/NEWS.d/next/Tests/2021-10-07-13-27-12.bpo-45403.7QiDvw.rst
@@ -0,0 +1,2 @@
1
+Fix test_sys.test_stdlib_dir() when Python is built outside the source tree:
2
+compare normalized paths. Patch by Victor Stinner.
0 commit comments