diff --git a/python/pyarrow/tests/parquet/test_data_types.py b/python/pyarrow/tests/parquet/test_data_types.py index 6b68ac9f09414..a762a5bcb4f5d 100644 --- a/python/pyarrow/tests/parquet/test_data_types.py +++ b/python/pyarrow/tests/parquet/test_data_types.py @@ -523,9 +523,3 @@ def test_json_extension_type(storage_type): table = pa.table([arr], names=["ext"]) _simple_table_roundtrip(table) - - for storage_type in (pa.int32(), pa.large_binary(), pa.float32()): - with pytest.raises( - pa.ArrowInvalid, - match="Invalid storage type for JsonExtensionType: " + str(storage_type)): - pa.json_(storage_type) diff --git a/python/pyarrow/tests/test_extension_type.py b/python/pyarrow/tests/test_extension_type.py index 4d496ba119b00..6b566d0e343d2 100644 --- a/python/pyarrow/tests/test_extension_type.py +++ b/python/pyarrow/tests/test_extension_type.py @@ -1973,3 +1973,10 @@ def test_json(storage_type, pickle_module): # cast extension type -> storage type inner = array.cast(storage_type) assert inner == storage + + for storage_type in (pa.int32(), pa.large_binary(), pa.float32()): + with pytest.raises( + pa.ArrowInvalid, + match="Invalid storage type for JsonExtensionType: " + + str(storage_type)): + pa.json_(storage_type)