| 193 | |
| 194 | @pytest.mark.parametrize('pyarrow_type', _supported_pyarrow_types, ids=str) |
| 195 | def test_field_roundtrip(pyarrow_type): |
| 196 | pyarrow_field = pa.field("test", pyarrow_type, nullable=True) |
| 197 | field = rust.round_trip_field(pyarrow_field) |
| 198 | assert field == pyarrow_field |
| 199 | |
| 200 | if pyarrow_type != pa.null(): |
| 201 | # A null type field may not be non-nullable |
| 202 | pyarrow_field = pa.field("test", pyarrow_type, nullable=False) |
| 203 | field = rust.round_trip_field(pyarrow_field) |
| 204 | assert field == pyarrow_field |
| 205 | |
| 206 | @pytest.mark.skipif(PYARROW_PRE_14, reason="requires pyarrow 14") |
| 207 | @pytest.mark.parametrize('pyarrow_type', _supported_pyarrow_types, ids=str) |