summaryrefslogtreecommitdiffstats
path: root/Lib/ctypes/test
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-02-26 08:45:20 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-02-26 08:45:20 (GMT)
commitffa1a77c679b6d2480e3b0e27aa3736de93cda2d (patch)
treeef73a05e931ba04743759596ba7f90baf54ec56b /Lib/ctypes/test
parentec5a2d5e89fbb2f3b4f1b68ece2735fd80985786 (diff)
downloadcpython-ffa1a77c679b6d2480e3b0e27aa3736de93cda2d.zip
cpython-ffa1a77c679b6d2480e3b0e27aa3736de93cda2d.tar.gz
cpython-ffa1a77c679b6d2480e3b0e27aa3736de93cda2d.tar.bz2
Issue #11258: Speed up ctypes.util.find_library() under Linux a lot. Patch
by Jonas H.
Diffstat (limited to 'Lib/ctypes/test')
-rw-r--r--Lib/ctypes/test/test_loading.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/ctypes/test/test_loading.py b/Lib/ctypes/test/test_loading.py
index 4029b46..c6815fa 100644
--- a/Lib/ctypes/test/test_loading.py
+++ b/Lib/ctypes/test/test_loading.py
@@ -102,5 +102,12 @@ class LoaderTest(unittest.TestCase):
# This is the real test: call the function via 'call_function'
self.assertEqual(0, call_function(proc, (None,)))
+ if os.name != "nt":
+ def test_libc_exists(self):
+ # A basic test that the libc is found by find_library()
+ # XXX Can this fail on some non-Windows systems?
+ self.assertTrue(libc_name)
+ self.assertTrue(os.path.exists(libc_name))
+
if __name__ == "__main__":
unittest.main()