Merge 3.4 (test_nntplib)

This commit is contained in:
Victor Stinner 2015-04-03 11:09:08 +02:00
commit 21dfffa218
1 changed files with 10 additions and 9 deletions

View File

@ -1509,7 +1509,7 @@ class MockSocketTests(unittest.TestCase):
Handler, nntplib.NNTPPermanentError, authinfo_response,
login, password)
@unittest.skipUnless(ssl, 'requires SSL support')
if ssl is not None:
class MockSslTests(MockSocketTests):
class nntp_class(nntplib.NNTP_SSL):
def __init__(self, *pos, **kw):
@ -1519,5 +1519,6 @@ class MockSslTests(MockSocketTests):
return sock
return super().__init__(*pos, ssl_context=bypass_context, **kw)
if __name__ == "__main__":
unittest.main()