def test_existing_spawn(self):
child = pexpect.spawnu("bash", timeout=5, echo=False)
repl = replwrap.REPLWrapper(child, re.compile('[$#]'),
"PS1='{0}' PS2='{1}' "
"PROMPT_COMMAND=''")
res = repl.run_command("echo $HOME")
assert res.startswith('/'), res
评论列表
文章目录