summaryrefslogtreecommitdiff
path: root/tests/functional/i/invalid_metaclass.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/i/invalid_metaclass.py')
-rw-r--r--tests/functional/i/invalid_metaclass.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/functional/i/invalid_metaclass.py b/tests/functional/i/invalid_metaclass.py
new file mode 100644
index 000000000..c0e9d74be
--- /dev/null
+++ b/tests/functional/i/invalid_metaclass.py
@@ -0,0 +1,34 @@
+# pylint: disable=missing-docstring, too-few-public-methods, import-error,unused-argument, useless-object-inheritance
+
+import abc
+
+import six
+from unknown import Unknown
+
+
+class InvalidAsMetaclass(object):
+ pass
+
+
+class ValidAsMetaclass(type):
+ pass
+
+
+@six.add_metaclass(type)
+class FirstGood(object):
+ pass
+
+
+@six.add_metaclass(abc.ABCMeta)
+class SecondGood(object):
+ pass
+
+
+@six.add_metaclass(Unknown)
+class ThirdGood(object):
+ pass
+
+
+@six.add_metaclass(ValidAsMetaclass)
+class FourthGood(object):
+ pass