diff options
author | David Cournapeau <cournape@gmail.com> | 2008-05-25 09:27:57 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2008-05-25 09:27:57 +0000 |
commit | dd490ff79df72b962675d00c36b949ab5b9ab6a9 (patch) | |
tree | 67402274125527d72689022da2a5fcb6df4337b9 /numpy/tests | |
parent | a73ef5ec3a8db5612779abe21c442bb89275ed6c (diff) | |
download | numpy-dd490ff79df72b962675d00c36b949ab5b9ab6a9.tar.gz |
Handle library with extension in their name for ctypes.load_library.
Diffstat (limited to 'numpy/tests')
-rw-r--r-- | numpy/tests/test_ctypeslib.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/numpy/tests/test_ctypeslib.py b/numpy/tests/test_ctypeslib.py index ceb574911..5d21a09ea 100644 --- a/numpy/tests/test_ctypeslib.py +++ b/numpy/tests/test_ctypeslib.py @@ -12,6 +12,22 @@ class TestLoadLibrary(NumpyTestCase): " (import error was: %s)" % str(e) print msg + def check_basic2(self): + """Regression for #801: load_library with a full library name + (including extension) does not work.""" + try: + try: + from distutils import sysconfig + so = sysconfig.get_config_var('SO') + cdll = load_library('multiarray%s' % so, + np.core.multiarray.__file__) + except ImportError: + print "No distutils available, skipping test." + except ImportError, e: + msg = "ctypes is not available on this python: skipping the test" \ + " (import error was: %s)" % str(e) + print msg + class TestNdpointer(NumpyTestCase): def check_dtype(self): dt = np.intc |