mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Issue #19744: improve ensurepip error when ssl is missing
This commit is contained in:
parent
f71cae0a93
commit
ae2ee96ad7
4 changed files with 81 additions and 2 deletions
|
@ -17,6 +17,9 @@ from test.support import (captured_stdout, captured_stderr, run_unittest,
|
|||
import textwrap
|
||||
import unittest
|
||||
import venv
|
||||
|
||||
# pip currently requires ssl support, so we ensure we handle
|
||||
# it being missing (http://bugs.python.org/issue19744)
|
||||
try:
|
||||
import ssl
|
||||
except ImportError:
|
||||
|
@ -285,8 +288,8 @@ class EnsurePipTest(BaseTest):
|
|||
self.run_with_capture(venv.create, self.env_dir, with_pip=False)
|
||||
self.assert_pip_not_installed()
|
||||
|
||||
# Temporary skip for http://bugs.python.org/issue19744
|
||||
@unittest.skipIf(ssl is None, 'pip needs SSL support')
|
||||
# Requesting pip fails without SSL (http://bugs.python.org/issue19744)
|
||||
@unittest.skipIf(ssl is None, ensurepip._MISSING_SSL_MESSAGE)
|
||||
def test_with_pip(self):
|
||||
shutil.rmtree(self.env_dir)
|
||||
with EnvironmentVarGuard() as envvars:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue