Make testprocess test more stable.
This commit is contained in:
parent
25ecd9068c
commit
4c2e92c998
@ -114,9 +114,8 @@ class TestWaitFor:
|
|||||||
"""Make sure the message of a previous test gets ignored."""
|
"""Make sure the message of a previous test gets ignored."""
|
||||||
pyproc.code = "print('foobar')"
|
pyproc.code = "print('foobar')"
|
||||||
pyproc.start()
|
pyproc.start()
|
||||||
# We can't use wait_for here, as that'd actually test what the next
|
line = pyproc.wait_for(data="foobar")
|
||||||
# test does.
|
line.waited_for = False # so we don't test what the next test does
|
||||||
time.sleep(0.5)
|
|
||||||
pyproc.after_test()
|
pyproc.after_test()
|
||||||
with pytest.raises(testprocess.WaitForTimeout):
|
with pytest.raises(testprocess.WaitForTimeout):
|
||||||
pyproc.wait_for(data="foobar", timeout=100)
|
pyproc.wait_for(data="foobar", timeout=100)
|
||||||
|
Loading…
Reference in New Issue
Block a user