Skip to content

Commit

Permalink
gh-116112: Fix ResourceWarning in test_asyncio.test_stream
Browse files Browse the repository at this point in the history
Co-authored-by: @CendioOssman
  • Loading branch information
sobolevn committed Mar 5, 2024
1 parent a29998a commit a305203
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Lib/test/test_asyncio/test_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,7 @@ async def handle_echo(reader, writer):

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, [])
Expand Down

0 comments on commit a305203

Please sign in to comment.