summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-03-19 16:31:20 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-03-19 16:31:20 (GMT)
commit9a90243f8b5a2b8d92cedb1e8745b8758fe08ebf (patch)
tree721e567f8a33896182d5bfbf950e27420c4ac0f1 /Lib/test
parent232b017607e6177286f55c2e9e581cbc9109bda4 (diff)
downloadcpython-9a90243f8b5a2b8d92cedb1e8745b8758fe08ebf.zip
cpython-9a90243f8b5a2b8d92cedb1e8745b8758fe08ebf.tar.gz
cpython-9a90243f8b5a2b8d92cedb1e8745b8758fe08ebf.tar.bz2
Skip test_urllib2.test_issue16464() is the ssl module is missing
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_urllib2.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index 4b92d63..0316c3f 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -6,6 +6,10 @@ import io
import socket
import array
import sys
+try:
+ import ssl
+except ImportError:
+ ssl = None
import urllib.request
# The proxy bypass method imported below has logic specific to the OSX
@@ -1438,6 +1442,8 @@ class MiscTests(unittest.TestCase):
@unittest.skipUnless(support.is_resource_enabled('network'),
'test requires network access')
+ @unittest.skipIf(ssl is None,
+ 'test requires the ssl module')
def test_issue16464(self):
opener = urllib.request.build_opener()
request = urllib.request.Request("http://www.python.org/~jeremy/")