[Python-checkins] cpython (merge 3.5 -> default): merge 3.5 (closes #27968)

benjamin.peterson python-checkins at python.org
Wed Sep 7 12:01:10 EDT 2016


https://hg.python.org/cpython/rev/b43923ce86f0
changeset:   103227:b43923ce86f0
parent:      103225:1d8545fc0d63
parent:      103226:096dfac57e44
user:        Benjamin Peterson <benjamin at python.org>
date:        Wed Sep 07 09:00:57 2016 -0700
summary:
  merge 3.5 (closes #27968)

files:
  Lib/test/test_coroutines.py |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py
--- a/Lib/test/test_coroutines.py
+++ b/Lib/test/test_coroutines.py
@@ -1568,10 +1568,11 @@
     def test_fatal_coro_warning(self):
         # Issue 27811
         async def func(): pass
-        with warnings.catch_warnings():
+        with warnings.catch_warnings(), support.captured_stderr() as stderr:
             warnings.filterwarnings("error")
             func()
             support.gc_collect()
+        self.assertIn("was never awaited", stderr.getvalue())
 
 
 class CoroAsyncIOCompatTest(unittest.TestCase):

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list