summaryrefslogtreecommitdiffhomepage
path: root/tests/test_client.py
diff options
context:
space:
mode:
authorPierce Lopez <pierce.lopez@gmail.com>2017-06-02 03:18:00 -0400
committerPierce Lopez <pierce.lopez@gmail.com>2017-06-02 03:47:59 -0400
commit978b652cc4385f7706c49f3391bf2d91e93d4b18 (patch)
treea6efb8b746fe4b9070670491454c222b7afec542 /tests/test_client.py
parent91d644ae47f8e1d64f9e3c677ce2a5415be0caef (diff)
re-enable client cleanup test for python3
Diffstat (limited to 'tests/test_client.py')
-rw-r--r--tests/test_client.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/test_client.py b/tests/test_client.py
index 9c5761d6..f2f2ea45 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -280,13 +280,10 @@ class SSHClientTest (unittest.TestCase):
verify that when an SSHClient is collected, its transport (and the
transport's packetizer) is closed.
"""
- # Unclear why this is borked on Py3, but it is, and does not seem worth
- # pursuing at the moment. Skipped on PyPy because it fails on travis
- # for unknown reasons, works fine locally.
- # XXX: It's the release of the references to e.g packetizer that fails
- # in py3...
- if not PY2 or platform.python_implementation() == "PyPy":
+ # Skipped on PyPy because it fails on travis for unknown reasons
+ if platform.python_implementation() == "PyPy":
return
+
threading.Thread(target=self._run).start()
self.tc = paramiko.SSHClient()
@@ -304,8 +301,8 @@ class SSHClientTest (unittest.TestCase):
del self.tc
# force a collection to see whether the SSHClient object is deallocated
- # correctly. 2 GCs are needed to make sure it's really collected on
- # PyPy
+ # 2 GCs are needed on PyPy, time is needed for Python 3
+ time.sleep(0.3)
gc.collect()
gc.collect()