Skip to content

Commit c58d8ee

Browse files
authored
Revert "TST: de-xfail (#44659)" (#44665)
This reverts commit 7b78b73.
1 parent b6d9c89 commit c58d8ee

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

pandas/tests/frame/test_reductions.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ def wrapper(x):
9393
tm.assert_series_equal(
9494
result0, frame.apply(wrapper), check_dtype=check_dtype, rtol=rtol, atol=atol
9595
)
96+
# FIXME: HACK: win32
9697
tm.assert_series_equal(
9798
result1,
9899
frame.apply(wrapper, axis=1),
100+
check_dtype=False,
99101
rtol=rtol,
100102
atol=atol,
101103
)
@@ -198,7 +200,9 @@ def wrapper(x):
198200
result1 = f(axis=1, skipna=False)
199201

200202
tm.assert_series_equal(result0, frame.apply(wrapper))
201-
tm.assert_series_equal(result1, frame.apply(wrapper, axis=1))
203+
tm.assert_series_equal(
204+
result1, frame.apply(wrapper, axis=1), check_dtype=False
205+
) # FIXME: HACK: win32
202206
else:
203207
skipna_wrapper = alternative
204208
wrapper = alternative

pandas/tests/indexes/datetimes/test_indexing.py

+4
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,10 @@ def test_get_indexer_mixed_dtypes(self, target):
651651
([date(9999, 1, 1), date(9999, 1, 1)], [-1, -1]),
652652
],
653653
)
654+
# FIXME: these warnings are flaky GH#36131
655+
@pytest.mark.filterwarnings(
656+
"ignore:Comparison of Timestamp with datetime.date:FutureWarning"
657+
)
654658
def test_get_indexer_out_of_bounds_date(self, target, positions):
655659
values = DatetimeIndex([Timestamp("2020-01-01"), Timestamp("2020-01-02")])
656660

pandas/tests/io/parser/common/test_chunksize.py

+20-3
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ def test_chunk_begins_with_newline_whitespace(all_parsers):
162162

163163

164164
@pytest.mark.slow
165+
@pytest.mark.xfail(reason="GH38630, sometimes gives ResourceWarning", strict=False)
165166
def test_chunks_have_consistent_numerical_type(all_parsers):
166167
parser = all_parsers
167168
integers = [str(i) for i in range(499999)]
@@ -175,7 +176,7 @@ def test_chunks_have_consistent_numerical_type(all_parsers):
175176
assert result.a.dtype == float
176177

177178

178-
def test_warn_if_chunks_have_mismatched_type(all_parsers):
179+
def test_warn_if_chunks_have_mismatched_type(all_parsers, request):
179180
warning_type = None
180181
parser = all_parsers
181182
size = 10000
@@ -192,8 +193,24 @@ def test_warn_if_chunks_have_mismatched_type(all_parsers):
192193

193194
buf = StringIO(data)
194195

195-
with tm.assert_produces_warning(warning_type):
196-
df = parser.read_csv(buf)
196+
try:
197+
with tm.assert_produces_warning(warning_type):
198+
df = parser.read_csv(buf)
199+
except AssertionError as err:
200+
# 2021-02-21 this occasionally fails on the CI with an unexpected
201+
# ResourceWarning that we have been unable to track down,
202+
# see GH#38630
203+
if "ResourceWarning" not in str(err) or parser.engine != "python":
204+
raise
205+
206+
# Check the main assertion of the test before re-raising
207+
assert df.a.dtype == object
208+
209+
mark = pytest.mark.xfail(
210+
reason="ResourceWarning for unclosed SSL Socket, GH#38630"
211+
)
212+
request.node.add_marker(mark)
213+
raise
197214

198215
assert df.a.dtype == object
199216

0 commit comments

Comments
 (0)