aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/c/crash_missing_module_type.py
blob: 308606ff4d18b5ee867d84c34eb58660584e76f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
""" Test for a crash found in
https://bitbucket.org/logilab/astroid/issue/45/attributeerror-module-object-has-no#comment-11944673
"""
# pylint: disable=no-init, invalid-name, too-few-public-methods, redefined-outer-name, useless-object-inheritance
def decor(trop):
    """ decorator """
    return trop

class Foo(object):
    """ Class """
    @decor
    def prop(self):
        """ method """
        return self

if __name__ == '__main__':
    trop = Foo()
    trop.prop = 42