Skip to content

Commit

Permalink
Backport PR #48457 on branch 1.5.x (TST: Fix unsigned pyarrow types i…
Browse files Browse the repository at this point in the history
…n SIGNED_INT_PYARROW_DTYPES) (#49093)

Backport PR #48457: TST: Fix unsigned pyarrow types in SIGNED_INT_PYARROW_DTYPES

Co-authored-by: Gaurav Sheni <gvsheni@gmail.com>
  • Loading branch information
meeseeksmachine and gsheni committed Oct 14, 2022
1 parent 072402b commit c58f205
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pandas/_testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
import pyarrow as pa

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

FLOAT_PYARROW_DTYPES = [pa.float32(), pa.float64()]
Expand Down
7 changes: 7 additions & 0 deletions pandas/tests/extension/test_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,13 @@ def test_add_series_with_extension_array(self, data, request):
reason=f"add_checked not implemented for {pa_dtype}",
)
)
elif pa_dtype.equals("int8"):
request.node.add_marker(
pytest.mark.xfail(
raises=pa.ArrowInvalid,
reason=f"raises on overflow for {pa_dtype}",
)
)
super().test_add_series_with_extension_array(data)


Expand Down

0 comments on commit c58f205

Please sign in to comment.