]> granicus.if.org Git - python/commitdiff
Get rid of exception traceback printing in asyncio tests (GH-14343)
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Mon, 24 Jun 2019 16:47:28 +0000 (19:47 +0300)
committerGitHub <noreply@github.com>
Mon, 24 Jun 2019 16:47:28 +0000 (19:47 +0300)
Lib/test/test_asyncio/test_subprocess.py

index 7d72e6cde4e7a840cda09076490a354bd08df6db..e9a9e50430c3f5a869df6d3408baf65bc34d7fee 100644 (file)
@@ -248,8 +248,8 @@ class SubprocessMixin:
         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):