fix test to pick up library on macports, closes #290

The environment DYLD_FALLBACK_LIBRARY_PATH helps to find macports
libraries in /opt/local/lib
This commit is contained in:
jevans 2014-10-24 19:32:21 -04:00
commit 5c262025b3

View file

@ -35,10 +35,11 @@ def openjpeg_not_found_by_ctypes():
Need to know if openjpeg library can be picked right up by ctypes for one Need to know if openjpeg library can be picked right up by ctypes for one
of the tests. of the tests.
""" """
if ctypes.util.find_library('openjpeg') is None: with patch.dict('os.environ', {'DYLD_FALLBACK_LIBRARY_PATH': '/opt/local/lib'}):
return True if ctypes.util.find_library('openjpeg') is None:
else: return True
return False else:
return False
@unittest.skipIf(sys.hexversion < 0x03020000, @unittest.skipIf(sys.hexversion < 0x03020000,