def testCommands(self): p = pexpect.spawn(self.ravelCmd) p.expect("ravel>") p.sendline("exit") p.expect(pexpect.EOF)