Skip to content

CI: ignore ResourceWarning in tm.assert_produces_warning #41083

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
Apr 22, 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
8 changes: 8 additions & 0 deletions pandas/_testing/_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ def _assert_caught_no_extra_warnings(

for actual_warning in caught_warnings:
if _is_unexpected_warning(actual_warning, expected_warning):
unclosed = "unclosed transport <asyncio.sslproto._SSLProtocolTransport"
if isinstance(actual_warning, ResourceWarning) and unclosed in str(
actual_warning
):
# FIXME: kludge because pytest.filterwarnings does not
# suppress these, xref GH#38630
continue

extra_warnings.append(
(
actual_warning.category.__name__,
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ xfail_strict = True
filterwarnings =
error:Sparse:FutureWarning
error:The SparseArray:FutureWarning
ignore:unclosed transport <asyncio.sslproto:ResourceWarning
junit_family = xunit2

[codespell]
Expand Down