summaryrefslogtreecommitdiffhomepage
path: root/tests/test_client.py
diff options
context:
space:
mode:
authorScott Maxwell <scott@codecobblers.com>2013-11-01 09:49:52 -0700
committerScott Maxwell <scott@codecobblers.com>2013-11-01 09:49:52 -0700
commit9662a7f779636f0328263a81cdeb76af25802970 (patch)
tree0d0caa288159db9439e22039b21127201fc09017 /tests/test_client.py
parent06b866cf406c035ecaffd7a8abd31d6e07b8811a (diff)
Changes inspired by the nischu7 branch
Diffstat (limited to 'tests/test_client.py')
-rw-r--r--tests/test_client.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/test_client.py b/tests/test_client.py
index a8d04630..e6d10699 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -207,8 +207,14 @@ class SSHClientTest (unittest.TestCase):
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)
+ #st = time.time()
+ #while (time.time() - st < 5.0) and (p() is not None):
+ # time.sleep(0.1)
+
+ # instead of dumbly waiting for the GC to collect, force a collection
+ # to see whether the SSHClient object is deallocated correctly
+ import gc
+ gc.collect()
+
self.assert_(p() is None)