From 70aa0cce36157722a54c7d738592c811af963a26 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Fri, 16 Aug 2019 14:15:46 -0500 Subject: [PATCH 1/2] TST: xfail on 37, win Closes https://github.com/pandas-dev/pandas/issues/27902 --- pandas/tests/groupby/test_categorical.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandas/tests/groupby/test_categorical.py b/pandas/tests/groupby/test_categorical.py index 756de3edd33dd..baa7117cf2aa7 100644 --- a/pandas/tests/groupby/test_categorical.py +++ b/pandas/tests/groupby/test_categorical.py @@ -1,9 +1,12 @@ from collections import OrderedDict from datetime import datetime +import sys import numpy as np import pytest +from pandas.compat import PY37 + import pandas as pd from pandas import ( Categorical, @@ -208,6 +211,9 @@ def test_level_get_group(observed): # GH#21636 previously flaky on py37 +@pytest.mark.xfail( + sys.platform.startswith("win") and PY37, reason="Flaky, GH-27902", strict=False +) @pytest.mark.parametrize("ordered", [True, False]) def test_apply(ordered): # GH 10138 From 982316cf8474f712ea15313a4bee418a6766e0f1 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Fri, 16 Aug 2019 14:26:52 -0500 Subject: [PATCH 2/2] fixup --- pandas/tests/groupby/test_categorical.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pandas/tests/groupby/test_categorical.py b/pandas/tests/groupby/test_categorical.py index baa7117cf2aa7..b5c2de267869d 100644 --- a/pandas/tests/groupby/test_categorical.py +++ b/pandas/tests/groupby/test_categorical.py @@ -1,11 +1,10 @@ from collections import OrderedDict from datetime import datetime -import sys import numpy as np import pytest -from pandas.compat import PY37 +from pandas.compat import PY37, is_platform_windows import pandas as pd from pandas import ( @@ -212,7 +211,7 @@ def test_level_get_group(observed): # GH#21636 previously flaky on py37 @pytest.mark.xfail( - sys.platform.startswith("win") and PY37, reason="Flaky, GH-27902", strict=False + is_platform_windows() and PY37, reason="Flaky, GH-27902", strict=False ) @pytest.mark.parametrize("ordered", [True, False]) def test_apply(ordered):