summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2006-12-27 14:41:21 -0500
committerRobey Pointer <robey@lag.net>2006-12-27 14:41:21 -0500
commitc570f1a35a0fde2a576062e84be8d4b91bd3ad91 (patch)
tree29b9f912140c76d58ee12ba188516426d66a2311 /tests
parent0a63d74a69d1124b6cd28d2c652c79dd82ec72ec (diff)
[project @ robey@lag.net-20061227194121-hzrmwbb6ea14unkg]
once, this test failed, so add a timer
Diffstat (limited to 'tests')
-rw-r--r--tests/test_client.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_client.py b/tests/test_client.py
index a53ff0e9..a8f8bc8c 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -22,6 +22,7 @@ Some unit tests for SSHClient.
import socket
import threading
+import time
import unittest
import weakref
@@ -149,5 +150,9 @@ class SSHClientTest (unittest.TestCase):
p = weakref.ref(self.tc._transport.packetizer)
self.assert_(p() is not None)
del self.tc
+ # hrm, sometimes p isn't cleared right away. why is that?
+ st = time.time()
+ while (time.time() - st < 5.0) and (p() is not None):
+ time.sleep(0.1)
self.assert_(p() is None)