summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-01-05 23:01:38 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-01-05 23:01:38 (GMT)
commit73efd621fb464cc3c90080848a9495cd7d42dd59 (patch)
treee2465e2b9f54e08c6087ea4780f3a3a4076c5981 /Lib
parent33e649cf6dc9b1764f309ed0a3206b474f8d99e1 (diff)
downloadcpython-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.py1
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")