summaryrefslogtreecommitdiff
path: root/Lib/test/test_smtplib.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-17 18:57:16 +0200
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-17 18:57:16 +0200
commit2ade6f24cb4ac21b9da36b0e1ce7414463c9f5d5 (patch)
treeb11f2f094692b1189522f6d08619eb7b99028d50 /Lib/test/test_smtplib.py
parentdf485ca493b52dd8f1848794b5a58e3c3d8e92b1 (diff)
parent3b69824de9860899372d3b816a0601889e2a0031 (diff)
downloadcpython-git-2ade6f24cb4ac21b9da36b0e1ce7414463c9f5d5.tar.gz
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.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py
index befc49e9d3..6fe2df96df 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")