From: Antoine Pitrou Date: Wed, 13 Oct 2010 17:14:16 +0000 (+0000) Subject: Protect test_smtpnet against connection failures X-Git-Tag: v3.2a4~627 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6003ff763305d4d32f80177d77aa41bbb8f7ce34;p=python Protect test_smtpnet against connection failures --- diff --git a/Lib/test/test_smtpnet.py b/Lib/test/test_smtpnet.py index 6f7f9ef7f4..f0f1edd127 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()