diff options
author | Boxiang Sun <daetalusun@gmail.com> | 2016-05-24 21:33:40 +0800 |
---|---|---|
committer | Boxiang Sun <daetalusun@gmail.com> | 2016-05-24 21:33:40 +0800 |
commit | a0e778177e17347f0bdf309ea2fb29e2dc3e0bf4 (patch) | |
tree | 240a976590226d705b1217c7ca16a8cbe73c3025 /numpy | |
parent | 59a7b250d4076d58c8b48bdf3800f2b1eac41e1b (diff) | |
download | numpy-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.py | 2 |
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") |