summaryrefslogtreecommitdiff
path: root/pylint/test
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2015-10-21 22:52:16 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2015-10-21 22:52:16 +0100
commit525a54d010f04157cb2d63768f9a1853783ffbf4 (patch)
tree33ccff1eb27fe09f4081e0c2b4d3bd0143c0b4fe /pylint/test
parent9c29e8041fa4ff49e3d4212bb0977c65293587cd (diff)
downloadpylint-525a54d010f04157cb2d63768f9a1853783ffbf4.tar.gz
Don't warn about abstract classes instantiated in their own body. Closes issue #627.
Diffstat (limited to 'pylint/test')
-rw-r--r--pylint/test/functional/abstract_class_instantiated_in_class.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/pylint/test/functional/abstract_class_instantiated_in_class.py b/pylint/test/functional/abstract_class_instantiated_in_class.py
new file mode 100644
index 0000000..9402c12
--- /dev/null
+++ b/pylint/test/functional/abstract_class_instantiated_in_class.py
@@ -0,0 +1,20 @@
+"""Don't warn if the class is instantiated in its own body."""
+# pylint: disable=missing-docstring
+
+
+import abc
+
+import six
+
+
+@six.add_metaclass(abc.ABCMeta)
+class Ala(object):
+
+ @abc.abstractmethod
+ def bala(self):
+ pass
+
+ @classmethod
+ def portocala(cls):
+ instance = cls()
+ return instance