]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-96021: Explicitly tear down the IsolatedAsyncioTestCase loop in tests (GH-96135...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 28 Aug 2022 05:35:39 +0000 (22:35 -0700)
committerGitHub <noreply@github.com>
Sun, 28 Aug 2022 05:35:39 +0000 (08:35 +0300)
commit9b070d361da2d1458ba005e2451b26d698c1fbf7
tree4d6b7a31138512533fe4ccb8b06679dc53c3f96e
parentc0a9859afb522d555a9b9851be48be56327d252d
gh-96021: Explicitly tear down the IsolatedAsyncioTestCase loop in tests (GH-96135) (GH-96235)

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 tear down the loop 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