aboutsummaryrefslogtreecommitdiff
path: root/tests/test_client.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_client.py')
-rw-r--r--tests/test_client.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/test_client.py b/tests/test_client.py
index 2f9b9a7..08ef1f9 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()