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.
This commit is contained in:
Victor Stinner 2021-10-07 21:22:28 +02:00 committed by GitHub
parent ff8859d965
commit 768aaf6c43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -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