Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH1051 Drop astype tests for Mac arm for float128 and complex256 #1057

Merged
merged 12 commits into from
Nov 27, 2024
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-latest is arm
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12"]

name: OS ${{ matrix.os }} - Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ black = ">=23.3.0"
isort = ">=5.12.0"
openpyxl = ">=3.0.10"
# for tables, MacOS gives random CI failures on 3.9.2
tables = { version = "==3.9.2", python = "<4" } # 3.8.0 depends on blosc2 which caps python to <4
tables = { version = ">=3.9.2", python = "<4" } # 3.8.0 depends on blosc2 which caps python to <4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version 3.10.1 is out, and it was what was used in the tests, so changing this from 3.9.2 to 3.10.1 is warranted.

lxml = ">=4.9.1"
pyreadstat = ">=1.2.0"
xlrd = ">=2.0.1"
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