mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
deal with travis installing ssl backport by default
This commit is contained in:
parent
60b0401b0a
commit
1ff6020130
3 changed files with 6 additions and 3 deletions
|
@ -136,7 +136,7 @@ def reset_env(environ=None,
|
|||
#hence, this workaround
|
||||
(env.lib_path/'no-global-site-packages.txt').rm()
|
||||
|
||||
if sys.version_info[:2] == (2, 5) and (not ssl) and insecure:
|
||||
if sys.version_info[:2] == (2, 5) and insecure:
|
||||
#allow py25 tests to work
|
||||
env.environ['PIP_INSECURE'] = '1'
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import os
|
|||
import pip
|
||||
import getpass
|
||||
from pip.basecommand import get_proxy
|
||||
from pip.backwardcompat import urllib2
|
||||
from pip.backwardcompat import urllib2, ssl
|
||||
from pip.download import urlopen, VerifiedHTTPSHandler
|
||||
from tests.test_pip import here
|
||||
|
||||
|
@ -79,7 +79,7 @@ def test_proxy_handlers_present():
|
|||
|
||||
handler_types = [h.__class__ for h in o.handlers]
|
||||
|
||||
if sys.version_info < (2, 6):
|
||||
if not ssl:
|
||||
assert handler_types == [
|
||||
urllib2.ProxyHandler, # this is needed
|
||||
urllib2.UnknownHandler,
|
||||
|
|
|
@ -29,6 +29,9 @@ class Tests_py25:
|
|||
"""
|
||||
Test py25 access https fails
|
||||
"""
|
||||
if ssl:
|
||||
#travis installs the backport in py25
|
||||
raise SkipTest()
|
||||
os.environ['PIP_INSECURE'] = ''
|
||||
assert_raises_regexp(PipError, 'ssl certified', urlopen.get_opener, scheme='https')
|
||||
|
||||
|
|
Loading…
Reference in a new issue