summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorBoxiang Sun <daetalusun@gmail.com>2016-05-24 21:33:40 +0800
committerBoxiang Sun <daetalusun@gmail.com>2016-05-24 21:33:40 +0800
commita0e778177e17347f0bdf309ea2fb29e2dc3e0bf4 (patch)
tree240a976590226d705b1217c7ca16a8cbe73c3025 /numpy
parent59a7b250d4076d58c8b48bdf3800f2b1eac41e1b (diff)
downloadnumpy-a0e778177e17347f0bdf309ea2fb29e2dc3e0bf4.tar.gz
do not check the module.__dict__ type explicity
This patch is for Pyston compatibility. In Pyston, the type of module.__dict__ is attrwrapper, which is a dict like type. The test in here is not really care for particular type, but instead cares for particular behaviour. So change the expilit type check to a interface check. This check can also get passed in CPython and PyPy
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/tests/test_api.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/tests/test_api.py b/numpy/core/tests/test_api.py
index 876cab4d7..08bc6f947 100644
--- a/numpy/core/tests/test_api.py
+++ b/numpy/core/tests/test_api.py
@@ -64,7 +64,7 @@ def test_array_array():
np.ones((), dtype=U5))
builtins = getattr(__builtins__, '__dict__', __builtins__)
- assert_(isinstance(builtins, dict))
+ assert_(hasattr(builtins, 'get'))
# test buffer
_buffer = builtins.get("buffer")