]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-29585: fix test fail on macOS Framework build (GH-2928)
authorINADA Naoki <methane@users.noreply.github.com>
Fri, 28 Jul 2017 12:28:19 +0000 (21:28 +0900)
committerGitHub <noreply@github.com>
Fri, 28 Jul 2017 12:28:19 +0000 (21:28 +0900)
Lib/test/test_site.py

index 4975a77022049f33deb4081d670afeda4aaa2885..99e7b4f8402a285961a95a6f0aea5f2387f3c0e9 100644 (file)
@@ -184,8 +184,12 @@ class HelperFunctionsTests(unittest.TestCase):
         self.assertEqual(site._getuserbase(), sysconfig._getuserbase())
 
     def test_get_path(self):
+        if sys.platform == 'darwin' and sys._framework:
+            scheme = 'osx_framework_user'
+        else:
+            scheme = os.name + '_user'
         self.assertEqual(site._get_path(site._getuserbase()),
-                         sysconfig.get_path('purelib', os.name + '_user'))
+                         sysconfig.get_path('purelib', scheme))
 
     @unittest.skipUnless(site.ENABLE_USER_SITE, "requires access to PEP 370 "
                           "user-site (site.ENABLE_USER_SITE)")