summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_streams.py
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2024-03-05 22:08:18 (GMT)
committerGitHub <noreply@github.com>2024-03-05 22:08:18 (GMT)
commit990a5f17d05214abe8aafedf8e6418a0fb5ffd50 (patch)
treee273eb836f1f70caf3855d20364fa46632ebba4a /Lib/test/test_asyncio/test_streams.py
parente205c5cd8f1a49d0ef126123312ee8a40d1416b6 (diff)
downloadcpython-990a5f17d05214abe8aafedf8e6418a0fb5ffd50.zip
cpython-990a5f17d05214abe8aafedf8e6418a0fb5ffd50.tar.gz
cpython-990a5f17d05214abe8aafedf8e6418a0fb5ffd50.tar.bz2
gh-116112: Fix `ResourceWarning` in `test_asyncio.test_stream` (#116371)
Co-authored-by: @CendioOssman
Diffstat (limited to 'Lib/test/test_asyncio/test_streams.py')
-rw-r--r--Lib/test/test_asyncio/test_streams.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py
index bf123eb..2cf4853 100644
--- a/Lib/test/test_asyncio/test_streams.py
+++ b/Lib/test/test_asyncio/test_streams.py
@@ -1188,6 +1188,7 @@ os.close(fd)
def test_unhandled_cancel(self):
async def handle_echo(reader, writer):
+ writer.close()
asyncio.current_task().cancel()
messages = self._basetest_unhandled_exceptions(handle_echo)
self.assertEqual(messages, [])