summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_type_check.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/tests/test_type_check.py')
-rw-r--r--numpy/lib/tests/test_type_check.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_type_check.py b/numpy/lib/tests/test_type_check.py
index 93a4da97a..4523e3f24 100644
--- a/numpy/lib/tests/test_type_check.py
+++ b/numpy/lib/tests/test_type_check.py
@@ -183,6 +183,15 @@ class TestIscomplexobj(TestCase):
dummy = DummyPd()
assert_(iscomplexobj(dummy))
+ def test_custom_dtype_duck(self):
+ class MyArray(list):
+ @property
+ def dtype(self):
+ return complex
+
+ a = MyArray([1+0j, 2+0j, 3+0j])
+ assert_(iscomplexobj(a))
+
class TestIsrealobj(TestCase):
def test_basic(self):