Skip to content

Commit 0357843

Browse files
committed
adding test for generators
1 parent b77dc5e commit 0357843

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

wolframclient/tests/serializers/wxf_pythonarray.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,9 @@ def test_python_array(self):
3030
export(arr, target_format="wxf"),
3131
export(NumericArray(array, wl_type, shape=shape), target_format="wxf"),
3232
)
33+
34+
def test_generators(self):
35+
self.assertEqual(
36+
export(numpy.arange(10).astype(numpy.int8), target_format="wxf"),
37+
export(NumericArray((i for i in range(10)), "Integer8", shape=(10, )), target_format="wxf"),
38+
)

0 commit comments

Comments
 (0)