]> granicus.if.org Git - python/commitdiff
test_site was failing under darwin for non-framework builds because a test was
authorBrett Cannon <bcannon@gmail.com>
Thu, 13 May 2010 23:59:41 +0000 (23:59 +0000)
committerBrett Cannon <bcannon@gmail.com>
Thu, 13 May 2010 23:59:41 +0000 (23:59 +0000)
assuming framework-specific site-packages directories were being used.

Lib/test/test_site.py
Misc/NEWS

index e59fce2540255c67cf709887b0932d2da82ee7c7..192f58a664ebeb8776d6ff1f71b4765b6e8980a4 100644 (file)
@@ -182,7 +182,8 @@ class HelperFunctionsTests(unittest.TestCase):
             self.assertEquals(dirs[1], wanted)
 
         # let's try the specific Apple location
-        if sys.platform == "darwin":
+        if (sys.platform == "darwin" and
+            sysconfig.get_config_var("PYTHONFRAMEWORK")):
             site.PREFIXES = ['Python.framework']
             dirs = site.getsitepackages()
             self.assertEqual(len(dirs), 4)
index 803e0603db597f0a0fb9ec34b3880fa1af56df15..b625e7b6bfc7fd92f8c7514ea22b7aaaefd2bdd0 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -21,6 +21,14 @@ Extension Modules
 - Issue #8674: Fixed a number of incorrect or undefined-behaviour-inducing
   overflow checks in the audioop module.
 
+Tests
+-----
+
+- On darwin, test_site assumed that a framework build was being used, leading
+  to a failure where four directories were expected for site-packages instead
+  of two in a non-framework build.
+
+
 What's New in Python 2.7 beta 2?
 ================================