Skip to content

Commit 704784e

Browse files
committed
Adjust more tests
1 parent 514b69c commit 704784e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pandas/tests/frame/test_reductions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,7 +1832,7 @@ def test_df_empty_min_count_0(self, opname, dtype, exp_value, exp_dtype):
18321832
df = DataFrame({0: [], 1: []}, dtype=dtype)
18331833
result = getattr(df, opname)(min_count=0)
18341834

1835-
expected = Series([exp_value, exp_value], dtype=exp_dtype)
1835+
expected = Series([exp_value, exp_value], dtype=exp_dtype, index=Index([0, 1]))
18361836
tm.assert_series_equal(result, expected)
18371837

18381838
@pytest.mark.parametrize(
@@ -1903,7 +1903,7 @@ def test_df_empty_nullable_min_count_1(self, opname, dtype, exp_dtype):
19031903
df = DataFrame({0: [], 1: []}, dtype=dtype)
19041904
result = getattr(df, opname)(min_count=1)
19051905

1906-
expected = Series([pd.NA, pd.NA], dtype=exp_dtype)
1906+
expected = Series([pd.NA, pd.NA], dtype=exp_dtype, index=Index([0, 1]))
19071907
tm.assert_series_equal(result, expected)
19081908

19091909

pandas/tests/io/excel/test_readers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,7 @@ def test_read_excel_multiindex(self, request, engine, read_ext):
10341034
[4, 5.5, pd.Timestamp("2015-01-04"), True],
10351035
],
10361036
columns=mi,
1037+
index=Index([0, 1, 2, 3], dtype="int64"),
10371038
)
10381039
expected[mi[2]] = expected[mi[2]].astype(f"M8[{unit}]")
10391040

0 commit comments

Comments
 (0)