diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-04-03 09:09:08 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-04-03 09:09:08 (GMT) |
commit | 21dfffa218be821af03bc3cdf928a62e9431aaf8 (patch) | |
tree | 2971ff28392eea26d750ec1a069930596758edd4 | |
parent | f1468eb44cd736b393f4f8e980f4e84d0b340a35 (diff) | |
parent | 8c9bba07d40f8a86bfa0dc87a4c06f91a07676a6 (diff) | |
download | cpython-21dfffa218be821af03bc3cdf928a62e9431aaf8.zip cpython-21dfffa218be821af03bc3cdf928a62e9431aaf8.tar.gz cpython-21dfffa218be821af03bc3cdf928a62e9431aaf8.tar.bz2 |
Merge 3.4 (test_nntplib)
-rw-r--r-- | Lib/test/test_nntplib.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py index 9e88ddb..9a80674 100644 --- a/Lib/test/test_nntplib.py +++ b/Lib/test/test_nntplib.py @@ -1509,15 +1509,16 @@ class MockSocketTests(unittest.TestCase): Handler, nntplib.NNTPPermanentError, authinfo_response, login, password) -@unittest.skipUnless(ssl, 'requires SSL support') -class MockSslTests(MockSocketTests): - class nntp_class(nntplib.NNTP_SSL): - def __init__(self, *pos, **kw): - class bypass_context: - """Bypass encryption and actual SSL module""" - def wrap_socket(sock, **args): - return sock - return super().__init__(*pos, ssl_context=bypass_context, **kw) +if ssl is not None: + class MockSslTests(MockSocketTests): + class nntp_class(nntplib.NNTP_SSL): + def __init__(self, *pos, **kw): + class bypass_context: + """Bypass encryption and actual SSL module""" + def wrap_socket(sock, **args): + return sock + return super().__init__(*pos, ssl_context=bypass_context, **kw) + if __name__ == "__main__": unittest.main() |