def expect(self, pattern, timeout=-<NUM_LIT:1>):
if self.blocking:<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>try:<EOL><INDENT>self.subprocess.expect(pattern=pattern, timeout=timeout)<EOL><DEDENT>except pexpect.EOF:<EOL><INDENT>pass<EOL><DEDENT>
Waits on the given pattern to appear in std_out