Skip to content

Commit bc73128

Browse files
Move callable type tests into dynd.nd instead of dynd.ndt.
1 parent 584c462 commit bc73128

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

dynd/nd/test/test_callable_type.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# import nd to ensure that the callable type is registered at all.
2+
from dynd import nd, ndt
3+
4+
class TestCallableType(unittest.TestCase):
5+
6+
def test_callable(self):
7+
tp = ndt.callable(ndt.void, ndt.int32, ndt.float64, x = ndt.complex128)
8+
9+
def test_callable_type(self):
10+
tp = ndt.callable(ndt.int32, ndt.float64)

dynd/ndt/test/test_dtype.py

-6
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ def test_tuple(self):
1010
def test_struct(self):
1111
tp = ndt.struct(x = ndt.int32, y = ndt.float64)
1212

13-
def test_callable(self):
14-
tp = ndt.callable(ndt.void, ndt.int32, ndt.float64, x = ndt.complex128)
15-
1613
class TestTypeFor(unittest.TestCase):
1714
def test_bool(self):
1815
self.assertEqual(ndt.bool, ndt.type_for(True))
@@ -182,9 +179,6 @@ def test_fixed_bytes_type(self):
182179
def test_cstruct_type(self):
183180
self.assertFalse(ndt.type('{x: int32}') == ndt.type('{y: int32}'))
184181

185-
def test_callable_type(self):
186-
tp = ndt.callable(ndt.int32, ndt.float64)
187-
188182
def test_struct_type(self):
189183
tp = ndt.make_struct([ndt.int32, ndt.int64], ['x', 'y'])
190184
self.assertTrue(tp.field_types, [ndt.int32, ndt.int64])

0 commit comments

Comments
 (0)