[Python-checkins] cpython (3.3): Issue #19857: Make sure that test_imaplib reaps server threads even in face of
charles-francois.natali
python-checkins at python.org
Sat Dec 7 20:53:42 CET 2013
http://hg.python.org/cpython/rev/78efa2c06447
changeset: 87813:78efa2c06447
branch: 3.3
parent: 87804:500cc1acc42f
user: Charles-François Natali <cf.natali at gmail.com>
date: Sat Dec 07 20:30:17 2013 +0100
summary:
Issue #19857: Make sure that test_imaplib reaps server threads even in face of
error upon client disconnection.
files:
Lib/test/test_imaplib.py | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py
--- a/Lib/test/test_imaplib.py
+++ b/Lib/test/test_imaplib.py
@@ -210,13 +210,12 @@
@contextmanager
def reaped_pair(self, hdlr):
- server, thread = self.make_server((support.HOST, 0), hdlr)
- client = self.imap_class(*server.server_address)
- try:
- yield server, client
- finally:
- client.logout()
- self.reap_server(server, thread)
+ with self.reaped_server(hdlr) as server:
+ client = self.imap_class(*server.server_address)
+ try:
+ yield server, client
+ finally:
+ client.logout()
@reap_threads
def test_connect(self):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list