Skip to content

Commit ad995ae

Browse files
committed
Add test for reading nested (list-of-struct) structures with a specified schema
1 parent 5f42660 commit ad995ae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bindings/python/test/test_arrow.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ def test_write_schema_validation(self):
333333
with self.assertRaises(ValueError):
334334
self.round_trip(data, Schema(schema))
335335

336+
337+
336338
def test_date_types(self):
337339
schema, data = self._create_data()
338340
self.round_trip(data, Schema(schema))
@@ -415,6 +417,10 @@ def inner(i):
415417
raw_data["nested"] = [inner(i) for i in range(3)]
416418
return schema, Table.from_pydict(raw_data, ArrowSchema(schema))
417419

420+
def test_write_nested_schema_validation(self):
421+
schema, data = self._create_nested_data(nested_elem=True)
422+
self.round_trip(data, Schema(schema))
423+
418424
def test_parquet(self):
419425
schema, data = self._create_nested_data()
420426
with tempfile.NamedTemporaryFile(suffix=".parquet") as f:

0 commit comments

Comments
 (0)