tests: skip_if_no_ssl decorator always returned None

This commit is contained in:
Sergey Shepelev
2013-01-10 16:06:31 +04:00
parent d4565ee6a0
commit b0b82a2f8a

View File

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