Skip to content

Commit

Permalink
TST: Fix unsigned pyarrow types in SIGNED_INT_PYARROW_DTYPES (pandas-…
Browse files Browse the repository at this point in the history
…dev#48457)

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update test_arrow.py

* Update test_arrow.py

* Update test_arrow.py

* Update test_arrow.py

* Update test_arrow.py

* Update test_arrow.py

* Update test_arrow.py

* Update test_arrow.py

* Update test_arrow.py

* Update test_arrow.py

* Update test_arrow.py

* Update test_arrow.py

* Update test_arrow.py

* Update test_arrow.py

* Update test_arrow.py

Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
  • Loading branch information
2 people authored and noatamir committed Nov 9, 2022
1 parent ee1890b commit eab87af
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
Expand Up @@ -199,7 +199,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
Expand Up @@ -1624,6 +1624,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 eab87af

Please sign in to comment.