diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2012-09-10 11:34:52 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2012-09-24 18:59:33 -0700 |
commit | e0be91a4c9804828f4a2531cfdb785ff978e10cf (patch) | |
tree | 8d24f7d6a2294eaaf4af4e40f314c479300e2148 /tests/test_client.py | |
parent | 212fe74f099fa240a73f3c42cf7e11bd56d7f885 (diff) |
Fixes to failing-test teardowns to avoid more exceptions or hangs
(cherry picked from commit 734f3d6f42ef1564f473fee5526e0354fc8196fc)
Conflicts:
test.py
Diffstat (limited to 'tests/test_client.py')
-rw-r--r-- | tests/test_client.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/test_client.py b/tests/test_client.py index 2f9b9a76..08ef1f92 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -68,11 +68,9 @@ class SSHClientTest (unittest.TestCase): thread.start() def tearDown(self): - if hasattr(self, 'tc'): - self.tc.close() - self.ts.close() - self.socks.close() - self.sockl.close() + for attr in "tc ts socks sockl".split(): + if hasattr(self, attr): + getattr(self, attr).close() def _run(self): self.socks, addr = self.sockl.accept() |