[3.11] GH-77403: Fix tests which fail when PYTHONUSERBASE is not normalized (GH-93917) (GH-93969)

(cherry picked from commit b1ae4af5e8)


Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>

Automerge-Triggered-By: GH:iritkatriel
This commit is contained in:
Miss Islington (bot) 2022-06-30 02:47:16 -07:00 committed by GitHub
parent 5084a64d38
commit c5ecfa0a1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -370,7 +370,7 @@ class TestSysConfig(unittest.TestCase):
base = base.replace(sys.base_prefix, sys.prefix)
if HAS_USER_BASE:
user_path = get_path(name, 'posix_user')
expected = global_path.replace(base, user, 1)
expected = os.path.normpath(global_path.replace(base, user, 1))
# bpo-44860: platlib of posix_user doesn't use sys.platlibdir,
# whereas posix_prefix does.
if name == 'platlib':