diff options
author | Pierre-Yves David <pierre-yves.david@logilab.fr> | 2009-11-25 19:07:53 +0100 |
---|---|---|
committer | Pierre-Yves David <pierre-yves.david@logilab.fr> | 2009-11-25 19:07:53 +0100 |
commit | 89d89c743418b95b2440961ad6caa4bad8f79c13 (patch) | |
tree | 3d10524301a21d07ea21324a275df7fc08aaa4cd /test | |
parent | 80971a44405f9b20c59ac33922bab6d84d642674 (diff) | |
download | pylint-git-89d89c743418b95b2440961ad6caa4bad8f79c13.tar.gz |
add testcase for #9334
Diffstat (limited to 'test')
-rw-r--r-- | test/input/func_noerror_class_attributes.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/input/func_noerror_class_attributes.py b/test/input/func_noerror_class_attributes.py new file mode 100644 index 000000000..bb4ec6d6a --- /dev/null +++ b/test/input/func_noerror_class_attributes.py @@ -0,0 +1,17 @@ +"""Test that valide class attribut doesn't trigger errors""" +__revision__ = 'sponge bob' + +class Clazz(object): + "dummy class" + + def __init__(self): + self.topic = 5 + self._data = 45 + + def change_type(self, new_class): + """Change type""" + self.__class__ = new_class + + def do_nothing(self): + "I do nothing useful" + return self.topic + 56 |