tests/process: Add a test for read/write notimpl methods

This commit is contained in:
Yury Selivanov 2016-04-15 01:08:57 -04:00
parent 2fbd4c1bd2
commit 82fbf4d666
1 changed files with 8 additions and 0 deletions

View File

@ -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()