From 5c262025b316ab4834e9854e658d189b43523f98 Mon Sep 17 00:00:00 2001 From: jevans Date: Fri, 24 Oct 2014 19:32:21 -0400 Subject: [PATCH] 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 --- glymur/test/test_config.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/glymur/test/test_config.py b/glymur/test/test_config.py index 5246f1e..ac24b89 100644 --- a/glymur/test/test_config.py +++ b/glymur/test/test_config.py @@ -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 of the tests. """ - if ctypes.util.find_library('openjpeg') is None: - return True - else: - return False + with patch.dict('os.environ', {'DYLD_FALLBACK_LIBRARY_PATH': '/opt/local/lib'}): + if ctypes.util.find_library('openjpeg') is None: + return True + else: + return False @unittest.skipIf(sys.hexversion < 0x03020000,