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