[Python-checkins] cpython (merge 3.5 -> 3.6): Merge test cleanup from 3.5 into 3.6

martin.panter python-checkins at python.org
Thu Sep 29 00:59:45 EDT 2016


https://hg.python.org/cpython/rev/04060fa4428d
changeset:   104151:04060fa4428d
branch:      3.6
parent:      104143:3afad465b3e1
parent:      104150:aba37f35b93b
user:        Martin Panter <vadmium+py at gmail.com>
date:        Thu Sep 29 04:40:56 2016 +0000
summary:
  Merge test cleanup from 3.5 into 3.6

files:
  Lib/ctypes/test/test_find.py |  25 +-----------------------
  1 files changed, 1 insertions(+), 24 deletions(-)


diff --git a/Lib/ctypes/test/test_find.py b/Lib/ctypes/test/test_find.py
--- 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
 import test.support
 from ctypes import *
@@ -112,28 +112,5 @@
                 self.assertEqual(find_library(libname), 'lib%s.so' % libname)
 
 
-# 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'.
- at unittest.skip('test disabled')
- at 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()

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list