[Python-checkins] gh-100600: Fix "coroutine was never awaited" warning in `test_coroutines` (GH-100601)

miss-islington webhook-mailer at python.org
Thu Dec 29 10:41:40 EST 2022


https://github.com/python/cpython/commit/dd520e7bae18549971b900b6dadc69bfc35d4b3f
commit: dd520e7bae18549971b900b6dadc69bfc35d4b3f
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-12-29T07:41:34-08:00
summary:

gh-100600: Fix "coroutine was never awaited" warning in `test_coroutines` (GH-100601)

(cherry picked from commit 76856366d3ece34c3e738f7167329e97bbf52b34)

Co-authored-by: Nikita Sobolev <mail at sobolevn.me>

files:
M Lib/test/test_coroutines.py

diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py
index 10f1a9efbcbd..93ddbf6e8976 100644
--- a/Lib/test/test_coroutines.py
+++ b/Lib/test/test_coroutines.py
@@ -2207,6 +2207,7 @@ async def f():
         gen = f()
         with self.assertWarns(RuntimeWarning):
             gen.cr_frame.clear()
+        gen.close()
 
     def test_stack_in_coroutine_throw(self):
         # Regression test for https://github.com/python/cpython/issues/93592



More information about the Python-checkins mailing list