diff options
| author | Guido van Rossum <guido@python.org> | 2013-12-18 14:43:13 -0800 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 2013-12-18 14:43:13 -0800 |
| commit | d2757b5d253657c2fe52f2d2cb053b4ed0df5811 (patch) | |
| tree | 554685434dbacc2b1d02738b4b1585c436c6a1e0 /tests | |
| parent | cf1d8d4569a8d0f6ff8b15a46fb5975e7c6b238b (diff) | |
| download | trollius-git-d2757b5d253657c2fe52f2d2cb053b4ed0df5811.tar.gz | |
Skip some tests if SNI not supported.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_events.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_events.py b/tests/test_events.py index 1c2560c..c6db4d1 100644 --- a/tests/test_events.py +++ b/tests/test_events.py @@ -10,6 +10,9 @@ try: import ssl except ImportError: ssl = None + HAS_SNI = False +else: + from ssl import HAS_SNI import subprocess import sys import threading @@ -666,6 +669,7 @@ class EventLoopTestsMixin: server.close() @unittest.skipIf(ssl is None, 'No ssl module') + @unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module') def test_create_server_ssl_verify_failed(self): proto = None @@ -694,6 +698,7 @@ class EventLoopTestsMixin: server.close() @unittest.skipIf(ssl is None, 'No ssl module') + @unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module') def test_create_server_ssl_match_failed(self): proto = None @@ -724,6 +729,7 @@ class EventLoopTestsMixin: server.close() @unittest.skipIf(ssl is None, 'No ssl module') + @unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module') def test_create_server_ssl_verified(self): proto = None @@ -899,7 +905,7 @@ class EventLoopTestsMixin: def test_internal_fds(self): loop = self.create_event_loop() if not isinstance(loop, selector_events.BaseSelectorEventLoop): - return + self.skipTest('loop is not a BaseSelectorEventLoop') self.assertEqual(1, loop._internal_fds) loop.close() |
