/Lib/test/pyclbr_input.py

http://unladen-swallow.googlecode.com/ · Python · 33 lines · 16 code · 10 blank · 7 comment · 0 complexity · 90639bcd22d193290767b87c9f759843 MD5 · raw file

  1. """Test cases for test_pyclbr.py"""
  2. def f(): pass
  3. class Other(object):
  4. @classmethod
  5. def foo(c): pass
  6. def om(self): pass
  7. class B (object):
  8. def bm(self): pass
  9. class C (B):
  10. foo = Other().foo
  11. om = Other.om
  12. d = 10
  13. # XXX: This causes test_pyclbr.py to fail, but only because the
  14. # introspection-based is_method() code in the test can't
  15. # distinguish between this and a geniune method function like m().
  16. # The pyclbr.py module gets this right as it parses the text.
  17. #
  18. #f = f
  19. def m(self): pass
  20. @staticmethod
  21. def sm(self): pass
  22. @classmethod
  23. def cm(self): pass