summaryrefslogtreecommitdiffhomepage
path: root/tests/test_client.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_client.py')
-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)