From: Victor Stinner Date: Thu, 4 Dec 2014 22:06:13 +0000 (+0100) Subject: Issue #22685: Fix test_pause_reading() of asyncio test_subprocess X-Git-Tag: v3.4.3rc1~268 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd8224e6a483a45d7cf2e7be0fa7d818a3f04c80;p=thirdparty%2FPython%2Fcpython.git Issue #22685: Fix test_pause_reading() of asyncio test_subprocess * mock also resume_reading() * ensure that resume_reading() is called --- diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py index c84078d32f87..9060b9d3ed32 100644 --- a/Lib/test/test_asyncio/test_subprocess.py +++ b/Lib/test/test_asyncio/test_subprocess.py @@ -181,6 +181,7 @@ class SubprocessMixin: loop=self.loop) stdout_transport = proc._transport.get_pipe_transport(1) stdout_transport.pause_reading = mock.Mock() + stdout_transport.resume_reading = mock.Mock() stdout, stderr = yield from proc.communicate() @@ -195,6 +196,7 @@ class SubprocessMixin: self.assertEqual(stdout, b'x' * size) self.assertTrue(transport.pause_reading.called) + self.assertTrue(transport.resume_reading.called) if sys.platform != 'win32':