From: Tarek Ziade Date: Sat, 21 May 2011 17:53:45 +0000 (+0200) Subject: skip the pypi upload doc test via https, if ssl is not available X-Git-Tag: v3.3.0a1~2203 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5edc31ecaf6b8eb2541054f6b9ed74c6b22bad4a;p=thirdparty%2FPython%2Fcpython.git skip the pypi upload doc test via https, if ssl is not available --- diff --git a/Lib/packaging/tests/test_command_upload_docs.py b/Lib/packaging/tests/test_command_upload_docs.py index 756843e00f18..9876d1872aaf 100644 --- a/Lib/packaging/tests/test_command_upload_docs.py +++ b/Lib/packaging/tests/test_command_upload_docs.py @@ -3,6 +3,10 @@ import os import sys import shutil import zipfile +try: + import _ssl +except ImportError: + _ssl = None from packaging.command import upload_docs as upload_docs_mod from packaging.command.upload_docs import (upload_docs, zip_dir, @@ -145,6 +149,7 @@ class UploadDocsTestCase(support.TempdirManager, self.assertIn(b'docs/index.html', content) self.assertIn(b'Ce mortel ennui', content) + @unittest.skipIf(_ssl is None, 'Needs SSL support') def test_https_connection(self): https_called = False