Skip to content

Commit b3f51be

Browse files
committed
adding tests
1 parent 36d4416 commit b3f51be

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

wolframclient/tests/serializers/wxf_numpy.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,13 @@ def test_numpy_integers(self):
224224
b"{65535, -2147483648, 0, -9223372036854775808, 18446744073709551615}",
225225
)
226226

227+
def test_scalars(self):
228+
for arr, result in (
229+
(numpy.array(1, dtype=numpy.int8), b"1"),
230+
(numpy.array(0.5, dtype=numpy.float32), b"0.5"),
231+
):
232+
self.assertEqual(export(arr), result)
233+
227234
def test_bad_options(self):
228235
with self.assertRaises(ValueError):
229236
NumPyWXFEncoder(packed_array_support=False, numeric_array_support=False)

0 commit comments

Comments
 (0)