summaryrefslogtreecommitdiff
path: root/numpy/tests
diff options
context:
space:
mode:
authorTadeu Manoel <tadeu@esss.com.br>2016-04-20 11:27:11 -0300
committerTadeu Manoel <tadeu@esss.com.br>2016-04-20 11:29:17 -0300
commitafe2f5a30ebdb2654c21e40428a818cebb1180b2 (patch)
tree5a5f92282dee4da70d78818ef3a3a2b0befd0dd9 /numpy/tests
parent35097048522b8b0da12b49639fdfc2d96ae81666 (diff)
downloadnumpy-afe2f5a30ebdb2654c21e40428a818cebb1180b2.tar.gz
TST: Fix test_ctypeslib and test_indexing when running on debug interpreter
Diffstat (limited to 'numpy/tests')
-rw-r--r--numpy/tests/test_ctypeslib.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/numpy/tests/test_ctypeslib.py b/numpy/tests/test_ctypeslib.py
index 36274ad46..2c58f1184 100644
--- a/numpy/tests/test_ctypeslib.py
+++ b/numpy/tests/test_ctypeslib.py
@@ -8,7 +8,14 @@ from numpy.distutils.misc_util import get_shared_lib_extension
from numpy.testing import TestCase, run_module_suite, dec
try:
- cdll = load_library('multiarray', np.core.multiarray.__file__)
+ cdll = None
+ if hasattr(sys, 'gettotalrefcount'):
+ try:
+ cdll = load_library('multiarray_d', np.core.multiarray.__file__)
+ except OSError:
+ pass
+ if cdll is None:
+ cdll = load_library('multiarray', np.core.multiarray.__file__)
_HAS_CTYPE = True
except ImportError:
_HAS_CTYPE = False