Skip to content

Commit be921ff

Browse files
authored
CI: ignore ResourceWarning in tm.assert_produces_warning (#41083)
1 parent 795c0c9 commit be921ff

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

pandas/_testing/_warnings.py

+8
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,14 @@ def _assert_caught_no_extra_warnings(
142142

143143
for actual_warning in caught_warnings:
144144
if _is_unexpected_warning(actual_warning, expected_warning):
145+
unclosed = "unclosed transport <asyncio.sslproto._SSLProtocolTransport"
146+
if isinstance(actual_warning, ResourceWarning) and unclosed in str(
147+
actual_warning
148+
):
149+
# FIXME: kludge because pytest.filterwarnings does not
150+
# suppress these, xref GH#38630
151+
continue
152+
145153
extra_warnings.append(
146154
(
147155
actual_warning.category.__name__,

setup.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ xfail_strict = True
137137
filterwarnings =
138138
error:Sparse:FutureWarning
139139
error:The SparseArray:FutureWarning
140-
ignore:unclosed transport <asyncio.sslproto:ResourceWarning
141140
junit_family = xunit2
142141

143142
[codespell]

0 commit comments

Comments
 (0)