pyclbr_input.py 648 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
"""Test cases for test_pyclbr.py"""

def f(): pass

class Other(object):
    @classmethod
    def foo(c): pass

    def om(self): pass

class B (object):
    def bm(self): pass
Tim Peters's avatar
Tim Peters committed
13

14 15 16
class C (B):
    foo = Other().foo
    om = Other.om
Tim Peters's avatar
Tim Peters committed
17

18 19 20 21
    d = 10

    # XXX: This causes test_pyclbr.py to fail, but only because the
    #      introspection-based is_method() code in the test can't
22
    #      distinguish between this and a genuine method function like m().
23 24 25
    #      The pyclbr.py module gets this right as it parses the text.
    #
    #f = f
Tim Peters's avatar
Tim Peters committed
26

27
    def m(self): pass
Tim Peters's avatar
Tim Peters committed
28

29 30 31 32 33
    @staticmethod
    def sm(self): pass

    @classmethod
    def cm(self): pass