Skip to content

Commit b0d9164

Browse files
committed
Avoid more work in larget_than_int32 tests
1 parent 1f6f42a commit b0d9164

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

pandas/tests/frame/test_stack_unstack.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,7 @@ def test_unstack_unobserved_keys(self, future_stack):
22272227
tm.assert_frame_equal(recons, df)
22282228

22292229
@pytest.mark.slow
2230-
def test_unstack_number_of_levels_larger_than_int32(
2230+
def test_unstack_number_of_levels_larger_than_int32_warns(
22312231
self, performance_warning, monkeypatch
22322232
):
22332233
# GH#20601
@@ -2239,6 +2239,9 @@ def __init__(self, *args, **kwargs) -> None:
22392239
super().__init__(*args, **kwargs)
22402240
raise Exception("Don't compute final result.")
22412241

2242+
def _make_selectors(self) -> None:
2243+
pass
2244+
22422245
with monkeypatch.context() as m:
22432246
m.setattr(reshape_lib, "_Unstacker", MockUnstacker)
22442247
df = DataFrame(

pandas/tests/reshape/test_pivot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2144,7 +2144,7 @@ def test_pivot_string_func_vs_func(self, f, f_numpy, data):
21442144
tm.assert_frame_equal(result, expected)
21452145

21462146
@pytest.mark.slow
2147-
def test_pivot_number_of_levels_larger_than_int32(
2147+
def test_pivot_number_of_levels_larger_than_int32_warns(
21482148
self, performance_warning, monkeypatch
21492149
):
21502150
# GH 20601
@@ -2155,6 +2155,9 @@ def __init__(self, *args, **kwargs) -> None:
21552155
super().__init__(*args, **kwargs)
21562156
raise Exception("Don't compute final result.")
21572157

2158+
def _make_selectors(self) -> None:
2159+
pass
2160+
21582161
with monkeypatch.context() as m:
21592162
m.setattr(reshape_lib, "_Unstacker", MockUnstacker)
21602163
df = DataFrame(

0 commit comments

Comments
 (0)