summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-09-05 17:14:54 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-09-05 17:14:54 (GMT)
commit2f40ed4b94ad48cca01a96620da8c3eb15493539 (patch)
tree108449a0c9a2e4e918da13abbad61d1fcc4456ae /Lib/test
parentfb5ce7eea18b287679f4a8b70c2391f6e9d71833 (diff)
downloadcpython-2f40ed4b94ad48cca01a96620da8c3eb15493539.zip
cpython-2f40ed4b94ad48cca01a96620da8c3eb15493539.tar.gz
cpython-2f40ed4b94ad48cca01a96620da8c3eb15493539.tar.bz2
do not allow _PyGen_Finalize to fail (closes #27811)
Patch from Armin Rigo.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_coroutines.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py
index d0cefb0..79cbec9 100644
--- a/Lib/test/test_coroutines.py
+++ b/Lib/test/test_coroutines.py
@@ -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):