[Python-checkins] Get rid of exception traceback printing in asyncio tests (GH-14343)

Miss Islington (bot) webhook-mailer at python.org
Mon Jun 24 13:21:50 EDT 2019


https://github.com/python/cpython/commit/b183b963f68e522e1bbba12a9c96ed7e0cc32e60
commit: b183b963f68e522e1bbba12a9c96ed7e0cc32e60
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-06-24T10:21:35-07:00
summary:

Get rid of exception traceback printing in asyncio tests (GH-14343)

(cherry picked from commit 549f7d45c8d61ab7b1d4a4e266b9d790ad6f7504)

Co-authored-by: Andrew Svetlov <andrew.svetlov at gmail.com>

files:
M Lib/test/test_asyncio/test_subprocess.py

diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py
index 7d72e6cde4e7..e9a9e50430c3 100644
--- a/Lib/test/test_asyncio/test_subprocess.py
+++ b/Lib/test/test_asyncio/test_subprocess.py
@@ -248,8 +248,8 @@ def test_communicate_ignore_broken_pipe(self):
         proc, large_data = self.prepare_broken_pipe_test()
 
         # communicate() must ignore BrokenPipeError when feeding stdin
-        with test_utils.disable_logger():
-            self.loop.run_until_complete(proc.communicate(large_data))
+        self.loop.set_exception_handler(lambda loop, msg: None)
+        self.loop.run_until_complete(proc.communicate(large_data))
         self.loop.run_until_complete(proc.wait())
 
     def test_pause_reading(self):



More information about the Python-checkins mailing list