]> granicus.if.org Git - python/commitdiff
Merged revisions 85423 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 13 Oct 2010 17:20:54 +0000 (17:20 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 13 Oct 2010 17:20:54 +0000 (17:20 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85423 | antoine.pitrou | 2010-10-13 19:14:16 +0200 (mer., 13 oct. 2010) | 3 lines

  Protect test_smtpnet against connection failures
........

Lib/test/test_smtpnet.py

index 2108df5f940a101713769da9e74b32c65b425533..f25343d27f31ce90c1c21ebc144e886cc61f18b8 100644 (file)
@@ -12,7 +12,8 @@ class SmtpSSLTest(unittest.TestCase):
 
     def test_connect(self):
         test_support.get_attribute(smtplib, 'SMTP_SSL')
-        server = smtplib.SMTP_SSL(self.testServer, self.remotePort)
+        with test_support.transient_internet(self.testServer):
+            server = smtplib.SMTP_SSL(self.testServer, self.remotePort)
         server.ehlo()
         server.quit()