summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_site.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-06-30 09:48:13 (GMT)
committerGitHub <noreply@github.com>2022-06-30 09:48:13 (GMT)
commit226fdce45d217d6e9375d784d1e6aba00c7c491c (patch)
tree5a65f56c73483b793312daca208ea7c4a77c157a /Lib/test/test_site.py
parentee937571e72a8515f87488bc146553b2dc35dfd9 (diff)
downloadcpython-226fdce45d217d6e9375d784d1e6aba00c7c491c.zip
cpython-226fdce45d217d6e9375d784d1e6aba00c7c491c.tar.gz
cpython-226fdce45d217d6e9375d784d1e6aba00c7c491c.tar.bz2
[3.10] GH-77403: Fix tests which fail when PYTHONUSERBASE is not normalized (GH-93917) (GH-93970)
(cherry picked from commit b1ae4af5e82e7275cebcfb383690b816a388a785) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Automerge-Triggered-By: GH:iritkatriel
Diffstat (limited to 'Lib/test/test_site.py')
-rw-r--r--Lib/test/test_site.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
index aff3db5..93349ed 100644
--- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py
@@ -205,14 +205,14 @@ class HelperFunctionsTests(unittest.TestCase):
scheme = 'osx_framework_user'
else:
scheme = os.name + '_user'
- self.assertEqual(site._get_path(site._getuserbase()),
+ self.assertEqual(os.path.normpath(site._get_path(site._getuserbase())),
sysconfig.get_path('purelib', scheme))
@unittest.skipUnless(site.ENABLE_USER_SITE, "requires access to PEP 370 "
"user-site (site.ENABLE_USER_SITE)")
def test_s_option(self):
# (ncoghlan) Change this to use script_helper...
- usersite = site.USER_SITE
+ usersite = os.path.normpath(site.USER_SITE)
self.assertIn(usersite, sys.path)
env = os.environ.copy()