Skip to content

Commit c2ea044

Browse files
author
Christopher Rowley
committed
add tests for struct types
1 parent 63312d7 commit c2ea044

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/JlWrap.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,11 @@ end
506506
(InlineTimeDelta64{MINUTES}, "timedelta64[m]"),
507507
(InlineTimeDelta64{(SECONDS, 5)}, "timedelta64[5s]"),
508508
(InlineTimeDelta64{NumpyDates.UNBOUND_UNITS}, "timedelta64"),
509+
(Tuple{}, np.dtype(pylist())),
510+
(Tuple{Int32, Int32}, np.dtype(pylist([("f0", "int32"), ("f1", "int32")]))),
511+
(@NamedTuple{}, np.dtype(pylist())),
512+
(@NamedTuple{x::Int32, y::Int32}, np.dtype(pylist([("x", "int32"), ("y", "int32")]))),
513+
(Pair{Int32, Int32}, np.dtype(pylist([("first", "int32"), ("second", "int32")]))),
509514
]
510515
@test pyeq(Bool, pygetattr(pyjl(t), "__numpy_dtype__"), np.dtype(d))
511516
@test pyeq(Bool, np.dtype(pyjl(t)), np.dtype(d))

0 commit comments

Comments
 (0)