def test_openssh(self):
        openssh = util.find_openssh()
        if openssh is None:
            raise SkipTest('openssh is needed for this test')
        if sys.platform.startswith('win'):
            raise SkipTest('this test is not supported on Windows')
        try:
            import pexpect
        except __HOLE__:
            raise SkipTest('this test requires pexpect')
        # Fire up a new Python process using pexpect. Pexpect will assign a
        # PTY, and therefore the child will use openssh.
        for vm in self.vms:
            libdir = os.path.join(testenv.topdir, 'lib')
            env = os.environ.copy()
            env['PYTHONPATH'] = libdir
            args = ['-mtestmill.main']
            args += get_common_args()
            args += ['-m', 'platformtest.yml', 'ssh', self.appname, vm]
            child = pexpect.spawn(sys.executable, args, env=env)
            # Try to get some remote output. The interaction between Unix TTYs,
            # regular expressions, python string escapes, and shell expansions
            # make the 3 lines below the path to the Zen of Unix.
            child.expect('\$')  # escape '$' regex special
            child.send("echo 'Hello from remote!'\n")  # escape ! history expn
            # Skip echo, TTY changed '\n' to '\r\n', and literal \ + r and 
            # \ + n to match \r\n.
            child.expect(r'remote!\r\n')  # note: without ' so not the echo
            child.send('exit\n')
            child.expect([pexpect.EOF, pexpect.TIMEOUT])
dataset/ETHPy150Open ravello/testmill/lib/testmill/test/test_ssh.py/TestSSH.test_openssh