From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 9 Aug 2024 07:26:54 +0000 (+0200) Subject: [3.13] gh-122744: test_venv: ignore pip's complaint about missing ssl (GH-122776... X-Git-Tag: v3.13.0rc2~168 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3ba75aeba9f35486f065ed5a6b1789be39a675cd;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-122744: test_venv: ignore pip's complaint about missing ssl (GH-122776) (GH-122823) (cherry picked from commit 0d9c123d1ac4f3dd30bdef5182049d9a831eca10) Co-authored-by: Petr Viktorin --- diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py index 2b7d297f0117..b9fcc59d4966 100644 --- a/Lib/test/test_venv.py +++ b/Lib/test/test_venv.py @@ -886,6 +886,14 @@ class EnsurePipTest(BaseTest): err = re.sub("^(WARNING: )?The directory .* or its parent directory " "is not owned or is not writable by the current user.*$", "", err, flags=re.MULTILINE) + # Ignore warning about missing optional module: + try: + import ssl + except ImportError: + err = re.sub( + "^WARNING: Disabling truststore since ssl support is missing$", + "", + err, flags=re.MULTILINE) self.assertEqual(err.rstrip(), "") # Being fairly specific regarding the expected behaviour for the # initial bundling phase in Python 3.4. If the output changes in