From 82fbf4d666929fff529162ab216514563a7471d8 Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Fri, 15 Apr 2016 01:08:57 -0400 Subject: [PATCH] tests/process: Add a test for read/write notimpl methods --- tests/test_process.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_process.py b/tests/test_process.py index 10f80b1..63c5efb 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -148,6 +148,14 @@ while True: stderr=subprocess.PIPE, loop=self.loop) + transp = proc._transport + with self.assertRaises(NotImplementedError): + # stdin is WriteTransport + transp.get_pipe_transport(0).pause_reading() + with self.assertRaises((NotImplementedError, AttributeError)): + # stdout is ReadTransport + transp.get_pipe_transport(1).write(b'wat') + proc.stdin.write(b'foobar\n') await proc.stdin.drain() out = await proc.stdout.readline()