Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion scripts/test/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def nightly_pandas():
"pip",
"install",
"--pre",
"--use-deprecated=legacy-resolver",
"--upgrade",
"--extra-index-url",
"https://pypi.anaconda.org/scientific-python-nightly-wheels/simple",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4650,7 +4650,7 @@ def test_unstack() -> None:
df_flt = pd.DataFrame(
[
["a", "b", 1],
["a", "a", 12],
["a", "a", 12.2],
["b", "b", 14],
]
).set_index([0, 1])
Expand Down
26 changes: 18 additions & 8 deletions tests/test_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from typing_extensions import assert_type

from tests import (
PD_LTE_23,
TYPE_CHECKING_INVALID_USAGE,
check,
ensure_clean,
Expand All @@ -20,14 +21,23 @@ def test_types_assert_series_equal() -> None:
s1 = pd.Series([0, 1, 1, 0])
s2 = pd.Series([0, 1, 1, 0])
assert_series_equal(left=s1, right=s2)
assert_series_equal(
s1,
s2,
check_freq=False,
check_categorical=True,
check_flags=True,
check_datetimelike_compat=True,
)
if PD_LTE_23:
assert_series_equal(
s1,
s2,
check_freq=False,
check_categorical=True,
check_flags=True,
check_datetimelike_compat=True,
)
else:
assert_series_equal(
s1,
s2,
check_freq=False,
check_categorical=True,
check_flags=True,
)
if TYPE_CHECKING_INVALID_USAGE:
assert_series_equal( # type: ignore[call-overload] # pyright: ignore[reportCallIssue]
s1,
Expand Down
8 changes: 6 additions & 2 deletions tests/test_timefuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,12 @@ def test_timestamp_timedelta_series_arithmetic() -> None:
check(assert_type(r4, "pd.Series[float]"), pd.Series, float)
sb = pd.Series([1, 2]) == pd.Series([1, 3])
check(assert_type(sb, "pd.Series[bool]"), pd.Series, np.bool_)
r5 = sb * r1
check(assert_type(r5, "TimedeltaSeries"), pd.Series, pd.Timedelta)

# https://github.com/pandas-dev/pandas/issues/62316
if PD_LTE_23:
r5 = sb * r1
check(assert_type(r5, "TimedeltaSeries"), pd.Series, pd.Timedelta)

r6 = r1 * 4
check(assert_type(r6, "TimedeltaSeries"), pd.Series, pd.Timedelta)

Expand Down
Loading