Skip to content

Commit 3943edc

Browse files
jbrockmendelproost
authored andcommitted
restore xfail (pandas-dev#29013)
1 parent 9af692f commit 3943edc

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pandas/tests/groupby/test_categorical.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import numpy as np
55
import pytest
66

7-
from pandas.compat import PY37, is_platform_windows
7+
from pandas.compat import PY37
88

99
import pandas as pd
1010
from pandas import (
@@ -209,10 +209,9 @@ def test_level_get_group(observed):
209209
assert_frame_equal(result, expected)
210210

211211

212-
# GH#21636 previously flaky on py37
213-
@pytest.mark.xfail(
214-
is_platform_windows() and PY37, reason="Flaky, GH-27902", strict=False
215-
)
212+
# GH#21636 flaky on py37; may be related to older numpy, see discussion
213+
# https://github.com/MacPython/pandas-wheels/pull/64
214+
@pytest.mark.xfail(PY37, reason="Flaky, GH-27902", strict=False)
216215
@pytest.mark.parametrize("ordered", [True, False])
217216
def test_apply(ordered):
218217
# GH 10138
@@ -229,6 +228,9 @@ def test_apply(ordered):
229228
idx = MultiIndex.from_arrays([missing, dense], names=["missing", "dense"])
230229
expected = DataFrame([0, 1, 2.0], index=idx, columns=["values"])
231230

231+
# GH#21636 tracking down the xfail, in some builds np.mean(df.loc[[0]])
232+
# is coming back as Series([0., 1., 0.], index=["missing", "dense", "values"])
233+
# when we expect Series(0., index=["values"])
232234
result = grouped.apply(lambda x: np.mean(x))
233235
assert_frame_equal(result, expected)
234236

0 commit comments

Comments
 (0)