From: Thomas Heller Date: Thu, 16 Mar 2006 20:09:22 +0000 (+0000) Subject: Fix a test that fails when libGL.so and libGLU.so are not installed (on posix systems). X-Git-Tag: v2.5a0~207 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=23e408603cffc2c1e515230deb7239e95f6173cb;p=python Fix a test that fails when libGL.so and libGLU.so are not installed (on posix systems). --- diff --git a/Lib/ctypes/test/test_posix.py b/Lib/ctypes/test/test_posix.py index 2b4fdff17a..fe0a40a1ae 100644 --- a/Lib/ctypes/test/test_posix.py +++ b/Lib/ctypes/test/test_posix.py @@ -8,8 +8,10 @@ if os.name == "posix" and sys.platform == "linux2": class TestRTLD_GLOBAL(unittest.TestCase): def test_GL(self): - cdll.load('libGL.so', mode=RTLD_GLOBAL) - cdll.load('libGLU.so') + if os.path.exists('/usr/lib/libGL.so'): + cdll.load('libGL.so', mode=RTLD_GLOBAL) + if os.path.exists('/usr/lib/libGLU.so'): + cdll.load('libGLU.so') ##if os.name == "posix" and sys.platform != "darwin":