summaryrefslogtreecommitdiffhomepage
path: root/tests/test_client.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-09-15 14:05:15 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2014-09-15 14:05:15 -0700
commit56a4739923a356ff5670b4620139ca55a2f30148 (patch)
tree405e2573eaacc37615607a349773d389078c31fc /tests/test_client.py
parentf74c7d76ec2ea9d39a4af6643761b648f81bd266 (diff)
Switched everything to use cryptography
Diffstat (limited to 'tests/test_client.py')
-rw-r--r--tests/test_client.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/test_client.py b/tests/test_client.py
index 6fda7f5e..b585fa0f 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -20,6 +20,7 @@
Some unit tests for SSHClient.
"""
+import gc
import socket
from tempfile import mkstemp
import threading
@@ -29,8 +30,9 @@ import warnings
import os
import time
from tests.util import test_path
+
import paramiko
-from paramiko.common import PY2, b
+from paramiko.common import PY2
from paramiko.ssh_exception import SSHException
@@ -287,14 +289,10 @@ class SSHClientTest (unittest.TestCase):
self.tc.close()
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)
-
- # instead of dumbly waiting for the GC to collect, force a collection
- # to see whether the SSHClient object is deallocated correctly
- import gc
+ # force a collection to see whether the SSHClient object is deallocated
+ # correctly
+ gc.collect()
+ gc.collect()
gc.collect()
self.assertTrue(p() is None)