diff --git a/python/testData/codeInsight/classMRO/DjangoForm.py b/python/testData/codeInsight/classMRO/DjangoForm.py new file mode 100644 index 000000000000..23d9fcdbe0fa --- /dev/null +++ b/python/testData/codeInsight/classMRO/DjangoForm.py @@ -0,0 +1,5 @@ +class BaseForm(object): pass +class DeclarativeFieldsMetaclass(type): pass + +class Form(six.with_metaclass(DeclarativeFieldsMetaclass, BaseForm)): + pass \ No newline at end of file diff --git a/python/testSrc/com/jetbrains/python/codeInsight/PyClassMROTest.java b/python/testSrc/com/jetbrains/python/codeInsight/PyClassMROTest.java index 8a6ef7073805..eafc32f8358e 100644 --- a/python/testSrc/com/jetbrains/python/codeInsight/PyClassMROTest.java +++ b/python/testSrc/com/jetbrains/python/codeInsight/PyClassMROTest.java @@ -47,6 +47,10 @@ public class PyClassMROTest extends PyTestCase { assertMRO(getClass("G"), "E", "F", "object"); } + public void testDjangoForm() { + assertMRO(getClass("Form"), "BaseForm", "object"); + } + // PY-4183 public void testComplicatedDiamond() { assertMRO(getClass("H"), "E", "F", "B", "G", "C", "D", "A", "object");