]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-122744: test_venv: ignore pip's complaint about missing ssl (GH-122776...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 9 Aug 2024 07:26:54 +0000 (09:26 +0200)
committerGitHub <noreply@github.com>
Fri, 9 Aug 2024 07:26:54 +0000 (09:26 +0200)
(cherry picked from commit 0d9c123d1ac4f3dd30bdef5182049d9a831eca10)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Lib/test/test_venv.py

index 2b7d297f01174162439f4d10f0a91c4bd05555c8..b9fcc59d49668c3b595b0284dd63461bb1123530 100644 (file)
@@ -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