]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-111644: Fix asyncio test_unhandled_exceptions() (#111713)
authorVictor Stinner <vstinner@python.org>
Sat, 4 Nov 2023 00:47:07 +0000 (01:47 +0100)
committerGitHub <noreply@github.com>
Sat, 4 Nov 2023 00:47:07 +0000 (00:47 +0000)
commitac01e2243a1104b2154c0d1bdbc9f8d5b3ada778
treef7a20f99ec3639f0180a721a0d5e827aba9e85e8
parentf62c7ccf9abf6e0493978da9cf9ca43adcd403f9
gh-111644: Fix asyncio test_unhandled_exceptions() (#111713)

Fix test_unhandled_exceptions() of test_asyncio.test_streams: break
explicitly a reference cycle.

Fix also StreamTests.tearDown(): the loop must not be closed
explicitly, but using set_event_loop() which takes care of shutting
down the executor with executor.shutdown(wait=True).
BaseEventLoop.close() calls executor.shutdown(wait=False).
Lib/test/test_asyncio/test_streams.py