From 10e52c6e9f90a5770d587484bbaca5ef180c1b8b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 5 Nov 2015 07:39:31 +0100 Subject: Make testprocess test more robust. --- tests/integration/test_testprocess.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/integration/test_testprocess.py b/tests/integration/test_testprocess.py index 1442802f1..4441514c7 100644 --- a/tests/integration/test_testprocess.py +++ b/tests/integration/test_testprocess.py @@ -121,9 +121,9 @@ class TestWaitFor: def test_existing_message_previous_test(self, pyproc): """Make sure the message of a previous test gets ignored.""" - pyproc.code = "print('foobar')" + pyproc.code = "import time; time.sleep(0.1); print('foobar')" pyproc.start() - time.sleep(0.5) # to make sure the message is printed + pyproc.wait_for(data="foobar") pyproc.after_test() with pytest.raises(testprocess.WaitForTimeout): pyproc.wait_for(data="foobar", timeout=100) -- cgit v1.2.3-54-g00ecf