Timeout behavior is not the same as pexpect
pexpect will eventually raise a timeout:
If nothing matches an expected pattern then expect() will eventually raise a TIMEOUT exception. The default time is 30 seconds, but you can change this by passing a timeout argument to expect():
It looks like rexpect does not timeout but hangs forever.
Is there a way to make rexpect timeout in some way like pexpect?
@yancyribbens: From the docs of spawn:
timeout: If Some: allexp_*commands time out after x milliseconds, if None: never times out. It’s highly recommended to put a timeout there, as otherwise in case of a problem the program just hangs instead of exiting with an error message indicating where it stopped. For automation 30’000 (30s, the default in pexpect) is a good value.
that works