changeset: 90023:e30142fde075 branch: 2.7 parent: 90010:3567d7ebd382 user: Ned Deily date: Sat Mar 29 00:07:42 2014 -0700 files: Lib/ctypes/test/test_macholib.py Misc/NEWS description: Issue #21093: Prevent failures of ctypes test_macholib on OS X if a copy of libz exists in $HOME/lib or /usr/local/lib. diff -r 3567d7ebd382 -r e30142fde075 Lib/ctypes/test/test_macholib.py --- a/Lib/ctypes/test/test_macholib.py Fri Mar 28 20:07:35 2014 +0100 +++ b/Lib/ctypes/test/test_macholib.py Sat Mar 29 00:07:42 2014 -0700 @@ -52,8 +52,11 @@ '/usr/lib/libSystem.B.dylib') result = find_lib('z') - self.assertTrue(result.startswith('/usr/lib/libz.1')) - self.assertTrue(result.endswith('.dylib')) + # Issue #21093: dyld default search path includes $HOME/lib and + # /usr/local/lib before /usr/lib, which caused test failures if + # a local copy of libz exists in one of them. Now ignore the head + # of the path. + self.assertRegexpMatches(result, r".*/lib/libz\..*.*\.dylib") self.assertEqual(find_lib('IOKit'), '/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit') diff -r 3567d7ebd382 -r e30142fde075 Misc/NEWS --- a/Misc/NEWS Fri Mar 28 20:07:35 2014 +0100 +++ b/Misc/NEWS Sat Mar 29 00:07:42 2014 -0700 @@ -336,6 +336,9 @@ redirect of http://www.python.org/ to https://www.python.org: use http://www.example.com instead. +- Issue #21093: Prevent failures of ctypes test_macholib on OS X if a + copy of libz exists in $HOME/lib or /usr/local/lib. + Documentation -------------