changeset: 90024:831bd1a1cf6c branch: 3.4 parent: 90021:0427c2ff653d user: Ned Deily date: Sat Mar 29 00:08:44 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 0427c2ff653d -r 831bd1a1cf6c Lib/ctypes/test/test_macholib.py --- a/Lib/ctypes/test/test_macholib.py Sat Mar 29 15:39:42 2014 +1000 +++ b/Lib/ctypes/test/test_macholib.py Sat Mar 29 00:08:44 2014 -0700 @@ -50,8 +50,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.assertRegex(result, r".*/lib/libz\..*.*\.dylib") self.assertEqual(find_lib('IOKit'), '/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit') diff -r 0427c2ff653d -r 831bd1a1cf6c Misc/NEWS --- a/Misc/NEWS Sat Mar 29 15:39:42 2014 +1000 +++ b/Misc/NEWS Sat Mar 29 00:08:44 2014 -0700 @@ -129,6 +129,9 @@ - Issue #20668: asyncio tests no longer rely on tests.txt file. (Patch by Vajrasky Kok) +- Issue #21093: Prevent failures of ctypes test_macholib on OS X if a + copy of libz exists in $HOME/lib or /usr/local/lib. + Tools/Demos -----------