diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-01-05 23:01:38 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-01-05 23:01:38 (GMT) |
commit | 73efd621fb464cc3c90080848a9495cd7d42dd59 (patch) | |
tree | e2465e2b9f54e08c6087ea4780f3a3a4076c5981 /Lib | |
parent | 33e649cf6dc9b1764f309ed0a3206b474f8d99e1 (diff) | |
download | cpython-73efd621fb464cc3c90080848a9495cd7d42dd59.zip cpython-73efd621fb464cc3c90080848a9495cd7d42dd59.tar.gz cpython-73efd621fb464cc3c90080848a9495cd7d42dd59.tar.bz2 |
test_imaplib: reap_server() closes the server when done
Fix a ResourceWarning(unclosed socket). Patch written by Nadeem Vawda.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_imaplib.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py index f9fbe96..acb89e3 100644 --- a/Lib/test/test_imaplib.py +++ b/Lib/test/test_imaplib.py @@ -135,6 +135,7 @@ class BaseThreadedNetworkedTests(unittest.TestCase): def reap_server(self, server, thread): if verbose: print("waiting for server") server.shutdown() + server.server_close() thread.join() if verbose: print("done") |