Skip to content

TST: de-xfail #44659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions pandas/tests/frame/test_reductions.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,9 @@ def wrapper(x):
tm.assert_series_equal(
result0, frame.apply(wrapper), check_dtype=check_dtype, rtol=rtol, atol=atol
)
# FIXME: HACK: win32
tm.assert_series_equal(
result1,
frame.apply(wrapper, axis=1),
check_dtype=False,
rtol=rtol,
atol=atol,
)
Expand Down Expand Up @@ -200,9 +198,7 @@ def wrapper(x):
result1 = f(axis=1, skipna=False)

tm.assert_series_equal(result0, frame.apply(wrapper))
tm.assert_series_equal(
result1, frame.apply(wrapper, axis=1), check_dtype=False
) # FIXME: HACK: win32
tm.assert_series_equal(result1, frame.apply(wrapper, axis=1))
else:
skipna_wrapper = alternative
wrapper = alternative
Expand Down
4 changes: 0 additions & 4 deletions pandas/tests/indexes/datetimes/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,10 +651,6 @@ def test_get_indexer_mixed_dtypes(self, target):
([date(9999, 1, 1), date(9999, 1, 1)], [-1, -1]),
],
)
# FIXME: these warnings are flaky GH#36131
@pytest.mark.filterwarnings(
"ignore:Comparison of Timestamp with datetime.date:FutureWarning"
)
def test_get_indexer_out_of_bounds_date(self, target, positions):
values = DatetimeIndex([Timestamp("2020-01-01"), Timestamp("2020-01-02")])

Expand Down
23 changes: 3 additions & 20 deletions pandas/tests/io/parser/common/test_chunksize.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ def test_chunk_begins_with_newline_whitespace(all_parsers):


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


def test_warn_if_chunks_have_mismatched_type(all_parsers, request):
def test_warn_if_chunks_have_mismatched_type(all_parsers):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well shoot, this already appears to have been wrong

warning_type = None
parser = all_parsers
size = 10000
Expand All @@ -193,24 +192,8 @@ def test_warn_if_chunks_have_mismatched_type(all_parsers, request):

buf = StringIO(data)

try:
with tm.assert_produces_warning(warning_type):
df = parser.read_csv(buf)
except AssertionError as err:
# 2021-02-21 this occasionally fails on the CI with an unexpected
# ResourceWarning that we have been unable to track down,
# see GH#38630
if "ResourceWarning" not in str(err) or parser.engine != "python":
raise

# Check the main assertion of the test before re-raising
assert df.a.dtype == object

mark = pytest.mark.xfail(
reason="ResourceWarning for unclosed SSL Socket, GH#38630"
)
request.node.add_marker(mark)
raise
with tm.assert_produces_warning(warning_type):
df = parser.read_csv(buf)

assert df.a.dtype == object

Expand Down