def test_zope35(self):
"""
Version 3.5 of L{zope.interface} has a C{implementer} method which
cannot be used as a class decorator.
"""
with SetAsideModule("zope"):
self.install((3, 5))
from zope.interface import Interface, implementer
class IDummy(Interface):
pass
try:
@implementer(IDummy)
class Dummy(object):
pass
except TypeError as exc:
self.assertEqual(
"Can't use implementer with classes. "
"Use one of the class-declaration functions instead.",
str(exc))
评论列表
文章目录