'Store arguments and in-memory "stdin".'

@contextmanager
def run(self, remote_command):

    self.thread_id = current_thread().ident
    self.stdin = BytesIO()
    self.remote_command = remote_command
    (yield self.stdin)
    self.stdin.seek(0, 0)
