diff options
author | Ned Deily <nad@acm.org> | 2014-03-29 07:07:42 (GMT) |
---|---|---|
committer | Ned Deily <nad@acm.org> | 2014-03-29 07:07:42 (GMT) |
commit | 3ac866539f6b43aa61367749d7c7f2e8a71f5fa7 (patch) | |
tree | bb1fe034bf4f1bc6ec0540c1e8b2393c4a4f886c /Lib/ctypes | |
parent | 0913bff8bc42f75fd971e56270866751ead144d4 (diff) | |
download | cpython-3ac866539f6b43aa61367749d7c7f2e8a71f5fa7.zip cpython-3ac866539f6b43aa61367749d7c7f2e8a71f5fa7.tar.gz cpython-3ac866539f6b43aa61367749d7c7f2e8a71f5fa7.tar.bz2 |
Issue #21093: Prevent failures of ctypes test_macholib on OS X if a
copy of libz exists in $HOME/lib or /usr/local/lib.
Diffstat (limited to 'Lib/ctypes')
-rw-r--r-- | Lib/ctypes/test/test_macholib.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/ctypes/test/test_macholib.py b/Lib/ctypes/test/test_macholib.py index eda846d..cf50f50 100644 --- a/Lib/ctypes/test/test_macholib.py +++ b/Lib/ctypes/test/test_macholib.py @@ -52,8 +52,11 @@ class MachOTest(unittest.TestCase): '/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') |