diff options
author | Adam Meily <meily.adam@gmail.com> | 2015-12-17 20:18:00 -0500 |
---|---|---|
committer | Adam Meily <meily.adam@gmail.com> | 2015-12-17 20:18:00 -0500 |
commit | 9a87a8eb599d2b3914a3f3fcedbea8b25ab33d5a (patch) | |
tree | 9ca66cf1c5f262e55f5c9cf420d316a6f25d0a00 /tests/test_client.py | |
parent | 787839d3bc41cdd86905df6883b7de2b1bfb165a (diff) | |
parent | 844dda88ca1827ede2c3f73792facab7d28eef74 (diff) |
Merge branch 'master' of github.com:paramiko/paramiko
Conflicts:
paramiko/sftp_file.py
sites/www/changelog.rst
Diffstat (limited to 'tests/test_client.py')
-rw-r--r-- | tests/test_client.py | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/tests/test_client.py b/tests/test_client.py index 3d2e75c9..f71efd5a 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -75,7 +75,7 @@ class NullServer (paramiko.ServerInterface): return paramiko.OPEN_SUCCEEDED def check_channel_exec_request(self, channel, command): - if command != 'yes': + if command != b'yes': return False return True @@ -193,12 +193,18 @@ class SSHClientTest (unittest.TestCase): (['dss', 'rsa', 'ecdsa'], ['dss']), # Try ECDSA but fail (['rsa', 'ecdsa'], ['ecdsa']), # ECDSA success ): - self._test_connection( - key_filename=[ - test_path('test_{0}.key'.format(x)) for x in attempt - ], - allowed_keys=[types_[x] for x in accept], - ) + try: + self._test_connection( + key_filename=[ + test_path('test_{0}.key'.format(x)) for x in attempt + ], + allowed_keys=[types_[x] for x in accept], + ) + finally: + # Clean up to avoid occasional gc-related deadlocks. + # TODO: use nose test generators after nose port + self.tearDown() + self.setUp() def test_multiple_key_files_failure(self): """ |