diff options
Diffstat (limited to 'tests/functional/n')
-rw-r--r-- | tests/functional/n/no/no_member_with_metaclass.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/functional/n/no/no_member_with_metaclass.py b/tests/functional/n/no/no_member_with_metaclass.py new file mode 100644 index 000000000..d5b0f93ae --- /dev/null +++ b/tests/functional/n/no/no_member_with_metaclass.py @@ -0,0 +1,20 @@ +# pylint: disable=missing-docstring,too-few-public-methods + + +class ParentMetaclass(type): + def __init__(cls, what, bases=None, attrs=None): + super().__init__(what, bases, attrs) + cls.aloha = "test" + + +class Parent(metaclass=ParentMetaclass): + def handle(self): + raise NotImplementedError + + +class Test(Parent): + def handle(self) -> None: + return self.aloha + + +print(Test().handle()) |