summaryrefslogtreecommitdiffstats
path: root/support/testing/tests/package/sample_python_pexpect.py
blob: cfe395fc29a8ecc570800de011a6b7d5fdd7ed18 (plain)
1
2
3
4
5
6
7
8
import pexpect

p = pexpect.spawn(["login"])
p.expect("login:")
p.sendline("wrong")
p.expect("Password:")
p.sendline("wrong")
p.expect("Login incorrect")
OpenPOWER on IntegriCloud