]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-96021: Explicitly close the IsolatedAsyncioTestCase runner in tests (GH-96135)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 25 Aug 2022 04:53:39 +0000 (21:53 -0700)
committerGitHub <noreply@github.com>
Thu, 25 Aug 2022 04:53:39 +0000 (21:53 -0700)
commitf51216df073310c783f1890993fe9b67ccb3c6b4
treec3198119e01414dc165d5d86a29ad2dca87ed36e
parent915ee9ed43b199de6f9fb371c2224ef4593522ab
gh-96021: Explicitly close the IsolatedAsyncioTestCase runner in tests (GH-96135)

Tests for IsolatedAsyncioTestCase.debug() rely on the runner be closed
in __del__. It makes tests depending on the GC an unreliable on other
implementations. It is better to close the runner explicitly even if
currently there is no a public API for this.
(cherry picked from commit 4de06e3cc0a58d73934f9a2759ad9cd2f6b031b0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/unittest/test/test_async_case.py