@@ -74,6 +74,10 @@ def assert_pyarrow_leak():
7474 pa .list_ (pa .int32 ()),
7575 pa .list_ (pa .int32 (), 2 ),
7676 pa .large_list (pa .uint16 ()),
77+ pa .list_view (pa .uint64 ()),
78+ pa .large_list_view (pa .uint64 ()),
79+ pa .list_view (pa .string ()),
80+ pa .large_list_view (pa .string ()),
7781 pa .struct (
7882 [
7983 pa .field ("a" , pa .int32 ()),
@@ -112,8 +116,6 @@ def assert_pyarrow_leak():
112116 ),
113117]
114118
115- _unsupported_pyarrow_types = [
116- ]
117119
118120# As of pyarrow 14, pyarrow implements the Arrow PyCapsule interface
119121# (https://arrow.apache.org/docs/format/CDataInterface/PyCapsuleInterface.html).
@@ -158,12 +160,6 @@ def test_type_roundtrip_pycapsule(pyarrow_type):
158160 assert restored == pyarrow_type
159161 assert restored is not pyarrow_type
160162
161-
162- @pytest .mark .parametrize ("pyarrow_type" , _unsupported_pyarrow_types , ids = str )
163- def test_type_roundtrip_raises (pyarrow_type ):
164- with pytest .raises (pa .ArrowException ):
165- rust .round_trip_type (pyarrow_type )
166-
167163@pytest .mark .parametrize ('pyarrow_type' , _supported_pyarrow_types , ids = str )
168164def test_field_roundtrip (pyarrow_type ):
169165 pyarrow_field = pa .field ("test" , pyarrow_type , nullable = True )
@@ -337,6 +333,20 @@ def test_list_array():
337333 del a
338334 del b
339335
336+
337+ def test_list_view_array ():
338+ """
339+ Python -> Rust -> Python
340+ """
341+ a = pa .array ([[], None , [1 , 2 ], [4 , 5 , 6 ]], pa .list_view (pa .int64 ()))
342+ b = rust .round_trip_array (a )
343+ b .validate (full = True )
344+ assert a .to_pylist () == b .to_pylist ()
345+ assert a .type == b .type
346+ del a
347+ del b
348+
349+
340350def test_map_array ():
341351 """
342352 Python -> Rust -> Python
0 commit comments