summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Yves David <pierre-yves.david@logilab.fr>2009-11-25 19:07:53 +0100
committerPierre-Yves David <pierre-yves.david@logilab.fr>2009-11-25 19:07:53 +0100
commit89d89c743418b95b2440961ad6caa4bad8f79c13 (patch)
tree3d10524301a21d07ea21324a275df7fc08aaa4cd
parent80971a44405f9b20c59ac33922bab6d84d642674 (diff)
downloadpylint-git-89d89c743418b95b2440961ad6caa4bad8f79c13.tar.gz
add testcase for #9334
-rw-r--r--test/input/func_noerror_class_attributes.py17
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