|
|
@@ -222,6 +222,13 @@ class WSFWDCommon: |
|
|
|
# XXX - make sure we don't overwrite an existing one |
|
|
|
self._procmsgs[stream] = hndlr |
|
|
|
|
|
|
|
def clear_stream_handler(self, stream): |
|
|
|
''' |
|
|
|
Clear the handler for stream. |
|
|
|
''' |
|
|
|
|
|
|
|
del self._procmsgs[stream] |
|
|
|
|
|
|
|
async def _process_msgs(self): |
|
|
|
''' |
|
|
|
Internal routine to dispatch messages received via |
|
|
@@ -625,6 +632,9 @@ class Test(unittest.IsolatedAsyncioTestCase): |
|
|
|
await self.drain(stream) |
|
|
|
|
|
|
|
async def handle_exec(self, msg): |
|
|
|
self.add_stream_handler(msg['stdin'], None) |
|
|
|
self.clear_stream_handler(msg['stdin']) |
|
|
|
assert msg['stdin'] not in self._procmsgs |
|
|
|
self.add_stream_handler(msg['stdin'], |
|
|
|
functools.partial(self.echo_handler, |
|
|
|
msg['stdout'])) |
|
|
|