crash_test_dummy.py 543 B

123456789101112131415161718192021222324252627282930313233
  1. # Copyright (c) Twisted Matrix Laboratories.
  2. # See LICENSE for details.
  3. from twisted.python import components
  4. from zope.interface import implementer, Interface
  5. def foo():
  6. return 2
  7. class X:
  8. def __init__(self, x):
  9. self.x = x
  10. def do(self):
  11. #print 'X',self.x,'doing!'
  12. pass
  13. class XComponent(components.Componentized):
  14. pass
  15. class IX(Interface):
  16. pass
  17. @implementer(IX)
  18. class XA(components.Adapter):
  19. def method(self):
  20. # Kick start :(
  21. pass
  22. components.registerAdapter(XA, X, IX)