Skip to content

Commit

Permalink
GH1051 Drop astype tests for Mac arm for float128 and complex256
Browse files Browse the repository at this point in the history
  • Loading branch information
loicdiridollou committed Nov 26, 2024
1 parent d289ef5 commit 9d141ae
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
strategy:
fail-fast: false
matrix:
# Don't use macos-latest because it is arm64
os: [ubuntu-latest, windows-latest, macos-13]
# macos-13 is intel-based, latest is arm
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]
python-version: ["3.10", "3.11", "3.12"]

name: OS ${{ matrix.os }} - Python ${{ matrix.python-version }}
Expand Down
18 changes: 18 additions & 0 deletions tests/test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2429,6 +2429,15 @@ def test_astype_float(cast_arg: FloatDtypeArg, target_type: type) -> None:
s.astype(cast_arg)
pytest.skip("Windows does not support float128")

if (
platform.system() == "Darwin"
and platform.processor() == "arm"
and cast_arg in ("f16", "float128")
):
with pytest.raises(TypeError):
s.astype(cast_arg)
pytest.skip("MacOS arm does not support float128")

check(s.astype(cast_arg), pd.Series, target_type)

if TYPE_CHECKING:
Expand Down Expand Up @@ -2482,6 +2491,15 @@ def test_astype_complex(cast_arg: ComplexDtypeArg, target_type: type) -> None:
s.astype(cast_arg)
pytest.skip("Windows does not support complex256")

if (
platform.system() == "Darwin"
and platform.processor() == "arm"
and cast_arg in ("c32", "complex256")
):
with pytest.raises(TypeError):
s.astype(cast_arg)
pytest.skip("MacOS arm does not support complex256")

check(s.astype(cast_arg), pd.Series, target_type)

if TYPE_CHECKING:
Expand Down

0 comments on commit 9d141ae

Please sign in to comment.