mirror of
https://fuchsia.googlesource.com/third_party/github.com/pylint-dev/pylint
synced 2024-09-21 16:19:21 +00:00
add testcase for #9334
This commit is contained in:
parent
80971a4440
commit
89d89c7434
17
test/input/func_noerror_class_attributes.py
Normal file
17
test/input/func_noerror_class_attributes.py
Normal file
|
@ -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
|
Loading…
Reference in New Issue
Block a user