blob: 19ccd62dead8ee10ec2256bf3f3d07d57b14bc8b [file] [log] [blame]
Anthony Baxterc2a5a632004-08-02 06:10:11 +00001"""Test cases for test_pyclbr.py"""
2
3def f(): pass
4
5class Other(object):
6 @classmethod
7 def foo(c): pass
8
9 def om(self): pass
10
11class B (object):
12 def bm(self): pass
Tim Peters6db15d72004-08-04 02:36:18 +000013
Anthony Baxterc2a5a632004-08-02 06:10:11 +000014class C (B):
15 foo = Other().foo
16 om = Other.om
Tim Peters6db15d72004-08-04 02:36:18 +000017
Anthony Baxterc2a5a632004-08-02 06:10:11 +000018 d = 10
19
20 # XXX: This causes test_pyclbr.py to fail, but only because the
21 # introspection-based is_method() code in the test can't
Ezio Melotti13925002011-03-16 11:05:33 +020022 # distinguish between this and a genuine method function like m().
Anthony Baxterc2a5a632004-08-02 06:10:11 +000023 # The pyclbr.py module gets this right as it parses the text.
24 #
25 #f = f
Tim Peters6db15d72004-08-04 02:36:18 +000026
Anthony Baxterc2a5a632004-08-02 06:10:11 +000027 def m(self): pass
Tim Peters6db15d72004-08-04 02:36:18 +000028
Anthony Baxterc2a5a632004-08-02 06:10:11 +000029 @staticmethod
30 def sm(self): pass
31
32 @classmethod
33 def cm(self): pass