pyclbr_input.py 648 B

123456789101112131415161718192021222324252627282930313233
  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 genuine 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