Skip to content

Commit 4146c21

Browse files
committed
also bugged on Mac
1 parent 0aea210 commit 4146c21

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
TYPE_CHECKING_INVALID_USAGE: Final = TYPE_CHECKING
9696
LINUX = sys.platform == "linux"
9797
WINDOWS = sys.platform in {"win32", "cygwin"}
98+
MAC = sys.platform == "darwin"
9899
PD_LTE_23 = Version(pd.__version__) < Version("2.3.999")
99100
NUMPY20 = np.lib.NumpyVersion(np.__version__) >= "2.0.0"
100101

tests/series/test_series.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555

5656
from tests import (
5757
LINUX,
58+
MAC,
5859
PD_LTE_23,
5960
TYPE_CHECKING_INVALID_USAGE,
6061
WINDOWS,
@@ -2626,9 +2627,9 @@ def test_astype_int(cast_arg: IntDtypeArg, target_type: type) -> None:
26262627
s = pd.Series([1, 2, 3])
26272628

26282629
s_astype = s.astype(cast_arg)
2629-
if LINUX and cast_arg in (np.longlong, "longlong", "q"):
2630-
# TODO: pandas-dev/pandas#54252 longlong is bugged in Linux
2631-
msg = rf"Expected type '{type(cast_arg)}' but got '{type(s_astype.iloc[0])}'"
2630+
if (LINUX or MAC) and cast_arg in {np.longlong, "longlong", "q"}:
2631+
# TODO: pandas-dev/pandas#54252 longlong is bugged on Linux and Mac
2632+
msg = rf"Expected type '{cast_arg}' but got '{type(s_astype.iloc[0])}'"
26322633
with pytest.raises(RuntimeError, match=msg):
26332634
check(s_astype, pd.Series, target_type)
26342635
else:

0 commit comments

Comments
 (0)