diff options
| author | Andrey Petrov <andrey.petrov@shazow.net> | 2014-08-25 15:18:05 -0700 |
|---|---|---|
| committer | Andrey Petrov <andrey.petrov@shazow.net> | 2014-08-25 15:18:05 -0700 |
| commit | 8e7feb7bc09feeca8d3fa0ea9ce6b76edec61ff1 (patch) | |
| tree | 4af6470dfb3e912d72f59c75133bf139954b2bac | |
| parent | faa639903f41e08ccec2ab1f4d0f663ae0353d9b (diff) | |
| download | urllib3-8e7feb7bc09feeca8d3fa0ea9ce6b76edec61ff1.tar.gz | |
Disable PyOpenSSL tests by default.
| -rw-r--r-- | test/contrib/test_pyopenssl.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/contrib/test_pyopenssl.py b/test/contrib/test_pyopenssl.py index c7a1823a..5d575277 100644 --- a/test/contrib/test_pyopenssl.py +++ b/test/contrib/test_pyopenssl.py @@ -1,11 +1,15 @@ +from nose.plugins.skip import SkipTest from urllib3.packages import six if six.PY3: - from nose.plugins.skip import SkipTest - raise SkipTest('Testing of PyOpenSSL disabled') + raise SkipTest('Testing of PyOpenSSL disabled on PY3') + +try: + from urllib3.contrib.pyopenssl import (inject_into_urllib3, + extract_from_urllib3) +except ImportError as e: + raise SkipTest('Could not import PyOpenSSL: %r' % e) -from urllib3.contrib.pyopenssl import (inject_into_urllib3, - extract_from_urllib3) from ..with_dummyserver.test_https import TestHTTPS, TestHTTPS_TLSv1 from ..with_dummyserver.test_socketlevel import TestSNI, TestSocketClosing |
