diff options
| author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-17 16:57:16 (GMT) |
|---|---|---|
| committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-17 16:57:16 (GMT) |
| commit | 2ade6f24cb4ac21b9da36b0e1ce7414463c9f5d5 (patch) | |
| tree | b11f2f094692b1189522f6d08619eb7b99028d50 /Lib/test/test_smtplib.py | |
| parent | df485ca493b52dd8f1848794b5a58e3c3d8e92b1 (diff) | |
| parent | 3b69824de9860899372d3b816a0601889e2a0031 (diff) | |
| download | cpython-2ade6f24cb4ac21b9da36b0e1ce7414463c9f5d5.zip cpython-2ade6f24cb4ac21b9da36b0e1ce7414463c9f5d5.tar.gz cpython-2ade6f24cb4ac21b9da36b0e1ce7414463c9f5d5.tar.bz2 | |
Issue #16647: save socket error details in LMTP.connect()
Initial patch by Serhiy Storchaka.
Diffstat (limited to 'Lib/test/test_smtplib.py')
| -rw-r--r-- | Lib/test/test_smtplib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py index befc49e..6fe2df9 100644 --- a/Lib/test/test_smtplib.py +++ b/Lib/test/test_smtplib.py @@ -542,9 +542,9 @@ class NonConnectingTests(unittest.TestCase): def testNonnumericPort(self): # check that non-numeric port raises socket.error - self.assertRaises(mock_socket.error, smtplib.SMTP, + self.assertRaises(OSError, smtplib.SMTP, "localhost", "bogus") - self.assertRaises(mock_socket.error, smtplib.SMTP, + self.assertRaises(OSError, smtplib.SMTP, "localhost:bogus") |
