diff --git a/pandas/tests/groupby/test_groupby.py b/pandas/tests/groupby/test_groupby.py index 63ce7ab2b85c8..635416f0cb1d6 100644 --- a/pandas/tests/groupby/test_groupby.py +++ b/pandas/tests/groupby/test_groupby.py @@ -390,10 +390,8 @@ def f3(x): depr_msg = "The behavior of array concatenation with empty entries is deprecated" # correct result - with tm.assert_produces_warning(FutureWarning, match=depr_msg): - result1 = df.groupby("a").apply(f1) - with tm.assert_produces_warning(FutureWarning, match=depr_msg): - result2 = df2.groupby("a").apply(f1) + result1 = df.groupby("a").apply(f1) + result2 = df2.groupby("a").apply(f1) tm.assert_frame_equal(result1, result2) # should fail (not the same number of levels)