mirror of https://github.com/python/cpython
gh-116112: Fix `ResourceWarning` in `test_asyncio.test_stream` (#116371)
Co-authored-by: @CendioOssman
This commit is contained in:
parent
e205c5cd8f
commit
990a5f17d0
|
@ -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, [])
|
||||
|
|
Loading…
Reference in New Issue