Kaydet (Commit) 21dfffa2 authored tarafından Victor Stinner's avatar Victor Stinner

Merge 3.4 (test_nntplib)

...@@ -1509,8 +1509,8 @@ class MockSocketTests(unittest.TestCase): ...@@ -1509,8 +1509,8 @@ class MockSocketTests(unittest.TestCase):
Handler, nntplib.NNTPPermanentError, authinfo_response, Handler, nntplib.NNTPPermanentError, authinfo_response,
login, password) login, password)
@unittest.skipUnless(ssl, 'requires SSL support') if ssl is not None:
class MockSslTests(MockSocketTests): class MockSslTests(MockSocketTests):
class nntp_class(nntplib.NNTP_SSL): class nntp_class(nntplib.NNTP_SSL):
def __init__(self, *pos, **kw): def __init__(self, *pos, **kw):
class bypass_context: class bypass_context:
...@@ -1519,5 +1519,6 @@ class MockSslTests(MockSocketTests): ...@@ -1519,5 +1519,6 @@ class MockSslTests(MockSocketTests):
return sock return sock
return super().__init__(*pos, ssl_context=bypass_context, **kw) return super().__init__(*pos, ssl_context=bypass_context, **kw)
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment