mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
(Merge 3.4) Skip test_urllib2.test_issue16464() is the ssl module is missing
This commit is contained in:
commit
9fb288f9bd
1 changed files with 6 additions and 0 deletions
|
@ -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/")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue