(self)
| 27 | |
| 28 | class responding: |
| 29 | def base_case(self) -> None: |
| 30 | # Basic "doesn't explode" test: respond.py will exit nonzero unless |
| 31 | # this works, causing a Failure. |
| 32 | watcher = Responder(r"What's the password\?", "Rosebud\n") |
| 33 | # Gotta give -u or Python will line-buffer its stdout, so we'll |
| 34 | # never actually see the prompt. |
| 35 | run( |
| 36 | "python -u respond_base.py", |
| 37 | watchers=[watcher], |
| 38 | hide=True, |
| 39 | timeout=5, |
| 40 | ) |
| 41 | |
| 42 | def both_streams(self) -> None: |
| 43 | watchers = [ |