do not allow _PyGen_Finalize to fail (closes #27811)

Patch from Armin Rigo.
This commit is contained in:
Benjamin Peterson 2016-09-05 10:14:54 -07:00
parent fb5ce7eea1
commit 2f40ed4b94
3 changed files with 25 additions and 13 deletions

View file

@ -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):