bpo-37137: Fix test_asyncio: use TestCase.set_event_loop() by vstinner · Pull Request #13779 · python/cpython

@vstinner

Replace asyncio.set_event_loop() with TestCase.set_event_loop() of
test_asyncio.utils: this method calls TestCase.close_loop() which
waits until the executor completes, to avoid leaking dangling
threads.

Inherit from test_asyncio.utils.TestCase rather than
unittest.TestCase.

asvetlov

vstinner

DinoV pushed a commit to DinoV/cpython that referenced this pull request

Jan 14, 2020
…13779)

Replace asyncio.set_event_loop() with TestCase.set_event_loop() of
test_asyncio.utils: this method calls TestCase.close_loop() which
waits until the executor completes, to avoid leaking dangling
threads.

Inherit from test_asyncio.utils.TestCase rather than
unittest.TestCase.