From 7baddf8d919a6d0e4b235734f0295d9803b9acad Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 16 Jun 2009 00:02:43 +0700 Subject: [PATCH] api_test: make error detected in test_error not escape to another test --- greentest/api_test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/greentest/api_test.py b/greentest/api_test.py index 8c20b16..64f1fad 100644 --- a/greentest/api_test.py +++ b/greentest/api_test.py @@ -117,10 +117,13 @@ class TestApi(TestCase): api.call_after(0, api.connect_tcp, ('127.0.0.1', bound_port)) api.call_after(0, api.connect_tcp, ('127.0.0.1', bound_port)) - api.tcp_server(server, accept_twice) + try: + api.tcp_server(server, accept_twice) + except: + api.sleep(0.1) + raise assert len(connected) == 2 - check_hub() def test_001_trampoline_timeout(self):