Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Disable tests when old versions of twisted are installed.

Twisted 10.0 (on an older version of Ubuntu) doesn't seem to work with class
decorators, even on python 2.6.  This makes the tests fail with a TypeError:

Traceback (most recent call last):
  File "tornado/test/", line 59, in test_import_twisted
    import tornado.platform.twisted
  File "tornado/platform/", line 108, in <module>
    TornadoDelayedCall = implementer(IDelayedCall)(TornadoDelayedCall)
  File "/usr/lib/python2.6/dist-packages/zope/interface/",
line 496, in __call__
    raise TypeError("Can't use implementer with classes.  Use one of "
TypeError: Can't use implementer with classes.  Use one of the
class-declaration functions instead.

If we catch a typeerror while importing twisted, act like twisted is not
  • Loading branch information...
commit a5bc9b5aa5c78fee20311b2a65db64d1b45c9a98 1 parent 4daeaeb
@apenwarr authored
Showing with 5 additions and 2 deletions.
  1. +4 −1 tornado/test/
  2. +1 −1  tornado/test/
5 tornado/test/
@@ -56,4 +56,7 @@ def test_import_twisted(self):
except ImportError:
- import tornado.platform.twisted
+ try:
+ import tornado.platform.twisted
+ except TypeError:
+ pass
2  tornado/test/
@@ -37,7 +37,7 @@
from tornado.platform.twisted import TornadoReactor
from zope.interface import implementer
have_twisted = True
-except ImportError:
+except (ImportError, TypeError):
have_twisted = False
from tornado.httpclient import AsyncHTTPClient
Please sign in to comment.
Something went wrong with that request. Please try again.