bpo-31250, test_asyncio: fix dangling threads by vstinner · Pull Request #3252 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Lib/asyncio/test_utils.py
2 changes: 2 additions & 0 deletions Lib/test/test_asyncio/test_futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ def run(arg):
self.assertTrue(asyncio.isfuture(f2))
self.assertEqual(res, 'oi')
self.assertNotEqual(ident, threading.get_ident())
ex.shutdown(wait=True)

def test_wrap_future_future(self):
f1 = self._new_future(loop=self.loop)
Expand All @@ -395,6 +396,7 @@ def run(arg):
f1 = ex.submit(run, 'oi')
f2 = asyncio.wrap_future(f1)
self.assertIs(self.loop, f2._loop)
ex.shutdown(wait=True)

def test_wrap_future_cancel(self):
f1 = concurrent.futures.Future()
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_asyncio/test_proactor_events.py