From 1dfb8b59be6e5dfdd3f00cc431e0c00bf29e8af2 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 23 Apr 2025 18:34:29 +0200 Subject: [PATCH] PY-76885 Conformance test failure: constructors_call_metaclass.py Updated tests. GitOrigin-RevId: 854d97694a821599b6fbbf70f37b07fb9b5b7bb5 --- .../Py3ArgumentListInspectionTest.java | 3 ++- .../PyArgumentListInspectionTest.java | 19 ------------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/python/testSrc/com/jetbrains/python/inspections/Py3ArgumentListInspectionTest.java b/python/testSrc/com/jetbrains/python/inspections/Py3ArgumentListInspectionTest.java index 6d9b0af2d9c5..e338f2dbe7d2 100644 --- a/python/testSrc/com/jetbrains/python/inspections/Py3ArgumentListInspectionTest.java +++ b/python/testSrc/com/jetbrains/python/inspections/Py3ArgumentListInspectionTest.java @@ -438,7 +438,8 @@ public class Py3ArgumentListInspectionTest extends PyInspectionTestCase { def __new__(cls, p) -> Self: ... - c = MyClass() + c1 = MyClass() + c2 = MyClass(1) # TODO PY-80602 Missing error 'Unexpected argument' """); } diff --git a/python/testSrc/com/jetbrains/python/inspections/PyArgumentListInspectionTest.java b/python/testSrc/com/jetbrains/python/inspections/PyArgumentListInspectionTest.java index f205d135cfd0..d19d951e6195 100644 --- a/python/testSrc/com/jetbrains/python/inspections/PyArgumentListInspectionTest.java +++ b/python/testSrc/com/jetbrains/python/inspections/PyArgumentListInspectionTest.java @@ -416,25 +416,6 @@ public class PyArgumentListInspectionTest extends PyInspectionTestCase { // PY-17877 public void testMetaclassHavingDunderCall() { - // TODO Metaclass's `__call__` has to be validated as well as `__init__` / `__new__` - //runWithLanguageLevel( - // LanguageLevel.getLatest(), - // () -> doTestByText(""" - // class MetaFoo(type): - // def __call__(cls, p3, p4): - // print(f'MetaFoo.__call__: {cls}, {p3}, {p4}') - // - // class Foo(metaclass=MetaFoo): - // pass - // - // class SubFoo(Foo): - // def __new__(self, p1, p2): - // # This never gets called - // print(f'SubFoo.__new__: {p1}, {p2}') - // - // sub = SubFoo(1) - // foo = Foo(3)""") - //); runWithLanguageLevel( LanguageLevel.getLatest(), () -> doTestByText("""