From 32d74e1d734ee5d74421b542033b7749a4f3d919 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Thu, 29 Sep 2016 02:50:20 +0000 Subject: [PATCH] Remove disabled ctypes test MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The test was commented out in 2005 before ctypes was added to Python, because the “cdll” attribute loading feature “will no longer work this way”: http://svn.python.org/view?view=revision&revision=49102 --- Lib/ctypes/test/test_find.py | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/Lib/ctypes/test/test_find.py b/Lib/ctypes/test/test_find.py index 26688992f5..c10d441f8f 100644 --- a/Lib/ctypes/test/test_find.py +++ b/Lib/ctypes/test/test_find.py @@ -1,5 +1,5 @@ import unittest -import os, os.path +import os.path import sys from test import test_support from ctypes import * @@ -71,28 +71,5 @@ class Test_OpenGL_libs(unittest.TestCase): self.assertFalse(os.path.lexists(test_support.TESTFN)) self.assertIsNone(result) -# On platforms where the default shared library suffix is '.so', -# at least some libraries can be loaded as attributes of the cdll -# object, since ctypes now tries loading the lib again -# with '.so' appended of the first try fails. -# -# Won't work for libc, unfortunately. OTOH, it isn't -# needed for libc since this is already mapped into the current -# process (?) -# -# On MAC OSX, it won't work either, because dlopen() needs a full path, -# and the default suffix is either none or '.dylib'. -@unittest.skip('test disabled') -@unittest.skipUnless(os.name=="posix" and sys.platform != "darwin", - 'test not suitable for this platform') -class LoadLibs(unittest.TestCase): - def test_libm(self): - import math - libm = cdll.libm - sqrt = libm.sqrt - sqrt.argtypes = (c_double,) - sqrt.restype = c_double - self.assertEqual(sqrt(2), math.sqrt(2)) - if __name__ == "__main__": unittest.main() -- 2.50.1