mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
do not allow _PyGen_Finalize to fail (closes #27811)
Patch from Armin Rigo.
This commit is contained in:
parent
fb5ce7eea1
commit
2f40ed4b94
3 changed files with 25 additions and 13 deletions
|
@ -1565,6 +1565,14 @@ class CoroutineTest(unittest.TestCase):
|
|||
finally:
|
||||
aw.close()
|
||||
|
||||
def test_fatal_coro_warning(self):
|
||||
# Issue 27811
|
||||
async def func(): pass
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings("error")
|
||||
func()
|
||||
support.gc_collect()
|
||||
|
||||
|
||||
class CoroAsyncIOCompatTest(unittest.TestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue