[riot-notifications] [RIOT-OS/RIOT] [BUG] testrunner matching local echo (#10952)
notifications at github.com
Tue Feb 5 16:26:07 CET 2019
miri64 commented on this pull request.
> @@ -0,0 +1,24 @@
+# TODO TEST FILE ONLY
+# SHOULD NOT BE MERGED
+from testrunner import run
+ child.expect_exact("Hello World!")
+ child.sendline("the test should not match this")
+ child.expect_exact("the test should not match this")
I think the correct way to do this `pexpect` style would be
res child.expect([pexpect.TIMEOUT, "the test should not match this"])
if res == 0:
raise RuntimeError("There should have been a timeout on the match,"
" and not match on stdin")
See e.g. [this of pexpect's own examples](https://github.com/pexpect/pexpect/blob/master/examples/monitor.py#L108)
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications