Skip to content

Commit d6b6845

Browse files
committed
update tests
1 parent 25e21e1 commit d6b6845

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pandas/tests/groupby/aggregate/test_other.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,9 @@ def test_agg_tzaware_non_datetime_result(as_period):
466466
tm.assert_series_equal(result, expected)
467467

468468
result = gb["b"].agg(lambda x: x.iloc[-1] - x.iloc[0])
469-
expected = Series([pd.Timedelta(days=1), pd.Timedelta(days=1)], name="b")
469+
expected = Series(
470+
[pd.Timedelta(days=1), pd.Timedelta(days=1)], name="b", dtype="m8[us]"
471+
)
470472
expected.index.name = "a"
471473
if as_period:
472474
expected = Series([pd.offsets.Day(1), pd.offsets.Day(1)], name="b")

pandas/tests/resample/test_timedelta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_asfreq_bug():
1919
result = df.resample("1min").asfreq()
2020
expected = DataFrame(
2121
data=[1, np.nan, np.nan, 3],
22-
index=timedelta_range("0 day", periods=4, freq="1min"),
22+
index=timedelta_range("0 day", periods=4, freq="1min", unit="us"),
2323
)
2424
tm.assert_frame_equal(result, expected)
2525

0 commit comments

Comments
 (0)