diff options
author | Giampaolo RodolĂ <g.rodola@gmail.com> | 2010-05-06 20:19:32 (GMT) |
---|---|---|
committer | Giampaolo RodolĂ <g.rodola@gmail.com> | 2010-05-06 20:19:32 (GMT) |
commit | e4499a88c2551400b94bda3ada0037a824c45402 (patch) | |
tree | 309b0f48a50aad612bac0e09ab367b5c198f0bb5 /Lib/test/test_smtplib.py | |
parent | 215b6b392d8530dee3e33caf12249dadfe71c07f (diff) | |
download | cpython-e4499a88c2551400b94bda3ada0037a824c45402.zip cpython-e4499a88c2551400b94bda3ada0037a824c45402.tar.gz cpython-e4499a88c2551400b94bda3ada0037a824c45402.tar.bz2 |
adds handle_error(self):raise to test modules using asyncore to provide a clearer error message in case something goes wrong
Diffstat (limited to 'Lib/test/test_smtplib.py')
-rw-r--r-- | Lib/test/test_smtplib.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py index b74fa40..42a10be 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) |