diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-13 17:14:16 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-13 17:14:16 (GMT) |
commit | 6003ff763305d4d32f80177d77aa41bbb8f7ce34 (patch) | |
tree | 65a2fe39a4d6577365236a5664ec8bbbf979016b /Lib/test/test_smtpnet.py | |
parent | d4958c2832b9b42c2d01d19119287bf35a7a9311 (diff) | |
download | cpython-6003ff763305d4d32f80177d77aa41bbb8f7ce34.zip cpython-6003ff763305d4d32f80177d77aa41bbb8f7ce34.tar.gz cpython-6003ff763305d4d32f80177d77aa41bbb8f7ce34.tar.bz2 |
Protect test_smtpnet against connection failures
Diffstat (limited to 'Lib/test/test_smtpnet.py')
-rw-r--r-- | Lib/test/test_smtpnet.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_smtpnet.py b/Lib/test/test_smtpnet.py index 6f7f9ef..f0f1edd 100644 --- a/Lib/test/test_smtpnet.py +++ b/Lib/test/test_smtpnet.py @@ -12,7 +12,8 @@ class SmtpSSLTest(unittest.TestCase): def test_connect(self): support.get_attribute(smtplib, 'SMTP_SSL') - server = smtplib.SMTP_SSL(self.testServer, self.remotePort) + with support.transient_internet(self.testServer): + server = smtplib.SMTP_SSL(self.testServer, self.remotePort) server.ehlo() server.quit() |