Skip to content

Commit d4bd0a3

Browse files
committed
more tests
1 parent 609f1f3 commit d4bd0a3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/test_dirac_basis.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ def test_dirac_basis_ndarray_private_roundtrip(basis, mask):
131131
# Negated mask joined with outer values should all be zero
132132
assert np.all((ref * ~mask) == 0)
133133

134+
assert y.shape == x.shape, "Incorrect shape"
135+
assert isinstance(y, np.ndarray), "Incorrect return object type"
136+
134137
np.testing.assert_equal(
135138
y, ref, err_msg="Arrays should be identical up to any `mask`."
136139
)
@@ -162,6 +165,9 @@ def test_dirac_basis_xparray_passthrough(basis, mask):
162165
# Negated mask joined with outer values should all be zero
163166
assert xp.all((ref * ~_mask) == 0)
164167

168+
assert y.shape == x.shape, "Incorrect shape"
169+
assert isinstance(y, xp.ndarray), "Incorrect return object type"
170+
165171
np.testing.assert_equal(
166172
xp.asnumpy(y),
167173
xp.asnumpy(ref),

0 commit comments

Comments
 (0)