Skip to content

Commit cecfe20

Browse files
committed
Fixup
1 parent 668b119 commit cecfe20

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pandas/tests/extension/test_arrow.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3780,7 +3780,6 @@ def test_arrow_dtype_itemsize_fixed_width(type_name, expected_size):
37803780
)
37813781

37823782

3783-
@pytest.mark.filterwarnings("ignore::Pandas4Warning") # min versions build
37843783
def test_roundtrip_of_nested_types():
37853784
df = pd.DataFrame(
37863785
{
@@ -3853,8 +3852,13 @@ def test_roundtrip_of_nested_types():
38533852
}
38543853
)
38553854

3856-
table = pa.Table.from_pandas(df)
3857-
result = table.to_pandas()
3855+
if pa_version_under19p0:
3856+
with tm.assert_produces_warning(Pandas4Warning):
3857+
table = pa.Table.from_pandas(df)
3858+
result = table.to_pandas()
3859+
else:
3860+
table = pa.Table.from_pandas(df)
3861+
result = table.to_pandas()
38583862
tm.assert_frame_equal(result, df)
38593863

38603864

0 commit comments

Comments
 (0)