Skip to content

Commit c58f205

Browse files
Backport PR #48457 on branch 1.5.x (TST: Fix unsigned pyarrow types in SIGNED_INT_PYARROW_DTYPES) (#49093)
Backport PR #48457: TST: Fix unsigned pyarrow types in SIGNED_INT_PYARROW_DTYPES Co-authored-by: Gaurav Sheni <[email protected]>
1 parent 072402b commit c58f205

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

pandas/_testing/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
import pyarrow as pa
198198

199199
UNSIGNED_INT_PYARROW_DTYPES = [pa.uint8(), pa.uint16(), pa.uint32(), pa.uint64()]
200-
SIGNED_INT_PYARROW_DTYPES = [pa.uint8(), pa.int16(), pa.int32(), pa.uint64()]
200+
SIGNED_INT_PYARROW_DTYPES = [pa.int8(), pa.int16(), pa.int32(), pa.int64()]
201201
ALL_INT_PYARROW_DTYPES = UNSIGNED_INT_PYARROW_DTYPES + SIGNED_INT_PYARROW_DTYPES
202202

203203
FLOAT_PYARROW_DTYPES = [pa.float32(), pa.float64()]

pandas/tests/extension/test_arrow.py

+7
Original file line numberDiff line numberDiff line change
@@ -1570,6 +1570,13 @@ def test_add_series_with_extension_array(self, data, request):
15701570
reason=f"add_checked not implemented for {pa_dtype}",
15711571
)
15721572
)
1573+
elif pa_dtype.equals("int8"):
1574+
request.node.add_marker(
1575+
pytest.mark.xfail(
1576+
raises=pa.ArrowInvalid,
1577+
reason=f"raises on overflow for {pa_dtype}",
1578+
)
1579+
)
15731580
super().test_add_series_with_extension_array(data)
15741581

15751582

0 commit comments

Comments
 (0)