From: Giampaolo RodolĂ  Date: Thu, 6 May 2010 20:19:32 +0000 (+0000) Subject: adds handle_error(self):raise to test modules using asyncore to provide a clearer... X-Git-Tag: v2.7b2~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e4499a88c2551400b94bda3ada0037a824c45402;p=thirdparty%2FPython%2Fcpython.git adds handle_error(self):raise to test modules using asyncore to provide a clearer error message in case something goes wrong --- diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py index 3a2ec5e84b10..7a0945f85947 100644 --- a/Lib/test/test_ftplib.py +++ b/Lib/test/test_ftplib.py @@ -48,6 +48,9 @@ class DummyDTPHandler(asynchat.async_chat): self.close() self.dtp_conn_closed = True + def handle_error(self): + raise + class DummyFTPHandler(asynchat.async_chat): diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py index b74fa407dd7d..42a10bee1d53 100644 --- a/Lib/test/test_smtplib.py +++ b/Lib/test/test_smtplib.py @@ -366,6 +366,9 @@ class SimSMTPChannel(smtpd.SMTPChannel): else: self.push('550 No access for you!') + def handle_error(self): + raise + class SimSMTPServer(smtpd.SMTPServer): @@ -384,6 +387,9 @@ class SimSMTPServer(smtpd.SMTPServer): def add_feature(self, feature): self._extra_features.append(feature) + def handle_error(self): + raise + # Test various SMTP & ESMTP commands/behaviors that require a simulated server # (i.e., something with more features than DebuggingServer)