From 7dfc85b046f24808a250fafbb9ba2d75b63fe655 Mon Sep 17 00:00:00 2001 From: hpk Date: Tue, 9 Sep 2008 20:18:22 +0200 Subject: [PATCH] [svn r58020] streamline pdb pexpect test --HG-- branch : trunk --- py/test/testing/acceptance_test.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/py/test/testing/acceptance_test.py b/py/test/testing/acceptance_test.py index a0a5a1f98..b3e1a5dce 100644 --- a/py/test/testing/acceptance_test.py +++ b/py/test/testing/acceptance_test.py @@ -404,13 +404,14 @@ class TestInteractive(AcceptBase): child = spawn("%s %s --pdb test_one.py" % (py.std.sys.executable, pytestpath)) - child.expect("(Pdb)", timeout=EXPECTTIMEOUT) + child.timeout = EXPECTTIMEOUT + child.expect("(Pdb)") child.sendline("l") - child.expect(".*def test_1.*", timeout=EXPECTTIMEOUT) + child.expect(".*def test_1.*") child.sendeof() - child.expect("failures: 1", timeout=EXPECTTIMEOUT) - child.wait() - + child.expect("failures: 1") + if child.isalive(): + child.wait() def test_simple_looponfailing_interaction(self): spawn = self.getspawn()