Skip to content

Commit d412b4f

Browse files
committed
Merge fixups
1 parent af002fc commit d412b4f

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

pandas/tests/groupby/aggregate/test_other.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def peak_to_peak(arr):
4949
if get_option("future_udf_behavior"):
5050
match = "Dropping invalid columns in DataFrameGroupBy.agg"
5151
else:
52-
match = (r"\['key2'\] did not aggregate successfully",)
52+
match = r"\['key2'\] did not aggregate successfully"
5353

5454
with tm.assert_produces_warning(
5555
FutureWarning,

pandas/tests/groupby/test_groupby.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,9 +584,11 @@ def test_frame_multi_key_function_list():
584584

585585
grouped = data.groupby(["A", "B"])
586586
funcs = [np.mean, np.std]
587-
with tm.assert_produces_warning(
588-
FutureWarning, match=r"\['C'\] did not aggregate successfully"
589-
):
587+
if get_option("future_udf_behavior"):
588+
klass, msg = None, None
589+
else:
590+
klass, msg = FutureWarning, r"\['C'\] did not aggregate successfully"
591+
with tm.assert_produces_warning(klass, match=msg):
590592
agged = grouped.agg(funcs)
591593
if get_option("future_udf_behavior"):
592594
expected = pd.concat(

pandas/tests/resample/test_resample_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,10 @@ def test_agg():
355355
expected = pd.concat([a_mean, a_std, b_mean, b_std], axis=1)
356356
expected.columns = pd.MultiIndex.from_product([["A", "B"], ["mean", "std"]])
357357
for t in cases:
358-
warn = FutureWarning if t in cases[1:3] else None
358+
if t in cases[1:3] and not get_option("FUTURE_UDF_BEHAVIOR"):
359+
warn = FutureWarning
360+
else:
361+
warn = None
359362
with tm.assert_produces_warning(
360363
warn,
361364
match=r"\['date'\] did not aggregate successfully",

0 commit comments

Comments
 (0)