diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2024-03-05 22:08:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-05 22:08:18 (GMT) |
commit | 990a5f17d05214abe8aafedf8e6418a0fb5ffd50 (patch) | |
tree | e273eb836f1f70caf3855d20364fa46632ebba4a /Lib/test/test_asyncio/test_streams.py | |
parent | e205c5cd8f1a49d0ef126123312ee8a40d1416b6 (diff) | |
download | cpython-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.py | 1 |
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, []) |