Issue #19744: improve ensurepip error when ssl is missing
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index e8437cf..3dfed35 100644
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -17,6 +17,9 @@
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 @@
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: