summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-03-23 17:16:06 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-03-23 17:16:06 +0000
commite2488d6b15e06cfbf603c72a99cf03006d2a89d6 (patch)
tree503e83cd73cbb9eecd879d2c56afec06c3be5899
parent48256603928421062e8d3f6b1c9ccb4a9d623277 (diff)
downloadnumpy-e2488d6b15e06cfbf603c72a99cf03006d2a89d6.tar.gz
Do not fail test when ctypes is not available; print a message about skipping the test instead.
-rw-r--r--numpy/tests/test_ctypeslib.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/numpy/tests/test_ctypeslib.py b/numpy/tests/test_ctypeslib.py
index 530764193..ceb574911 100644
--- a/numpy/tests/test_ctypeslib.py
+++ b/numpy/tests/test_ctypeslib.py
@@ -4,8 +4,13 @@ from numpy.testing import *
class TestLoadLibrary(NumpyTestCase):
def check_basic(self):
- cdll = load_library('multiarray',
- np.core.multiarray.__file__)
+ try:
+ cdll = load_library('multiarray',
+ np.core.multiarray.__file__)
+ 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):