]> granicus.if.org Git - python/commitdiff
Fix a test that fails when libGL.so and libGLU.so are not installed (on posix systems).
authorThomas Heller <theller@ctypes.org>
Thu, 16 Mar 2006 20:09:22 +0000 (20:09 +0000)
committerThomas Heller <theller@ctypes.org>
Thu, 16 Mar 2006 20:09:22 +0000 (20:09 +0000)
Lib/ctypes/test/test_posix.py

index 2b4fdff17ad5812c3b35b8dc54f252bd1788810e..fe0a40a1aead06c09797e256ac3556e008fadfbc 100644 (file)
@@ -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":