tests: skip_if_no_ssl decorator always returned None
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
# package is named tests, not test, so it won't be confused with test in stdlib
|
# package is named tests, not test, so it won't be confused with test in stdlib
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
import errno
|
import errno
|
||||||
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
from eventlet import debug, hubs
|
from eventlet import debug, hubs
|
||||||
|
|
||||||
|
|
||||||
# convenience for importers
|
# convenience for importers
|
||||||
main = unittest.main
|
main = unittest.main
|
||||||
|
|
||||||
@@ -114,11 +114,13 @@ def skip_if_no_ssl(func):
|
|||||||
""" Decorator that skips a test if SSL is not available."""
|
""" Decorator that skips a test if SSL is not available."""
|
||||||
try:
|
try:
|
||||||
import eventlet.green.ssl
|
import eventlet.green.ssl
|
||||||
|
return func
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
import eventlet.green.OpenSSL
|
import eventlet.green.OpenSSL
|
||||||
|
return func
|
||||||
except ImportError:
|
except ImportError:
|
||||||
skipped(func)
|
return skipped(func)
|
||||||
|
|
||||||
|
|
||||||
class TestIsTakingTooLong(Exception):
|
class TestIsTakingTooLong(Exception):
|
||||||
|
Reference in New Issue
Block a user