@@ -2751,38 +2751,6 @@ class Foo "FooObject *" "Foo_Type"
27512751 self .assertTrue (func .vectorcall )
27522752 self .assertTrue (func .vectorcall_exact_only )
27532753
2754- def test_vectorcall_zero_arg (self ):
2755- block = """
2756- module m
2757- class Foo "FooObject *" "Foo_Type"
2758- @classmethod
2759- @vectorcall zero_arg=_PyFoo_GetEmpty()
2760- Foo.__new__
2761- x: object = NULL
2762- /
2763- """
2764- func = self .parse_function (block , signatures_in_block = 3 ,
2765- function_index = 2 )
2766- self .assertTrue (func .vectorcall )
2767- self .assertFalse (func .vectorcall_exact_only )
2768- self .assertEqual (func .vectorcall_zero_arg , '_PyFoo_GetEmpty()' )
2769-
2770- def test_vectorcall_zero_arg_with_exact (self ):
2771- block = """
2772- module m
2773- class Foo "FooObject *" "Foo_Type"
2774- @classmethod
2775- @vectorcall exact_only zero_arg=get_cached()
2776- Foo.__new__
2777- x: object = NULL
2778- /
2779- """
2780- func = self .parse_function (block , signatures_in_block = 3 ,
2781- function_index = 2 )
2782- self .assertTrue (func .vectorcall )
2783- self .assertTrue (func .vectorcall_exact_only )
2784- self .assertEqual (func .vectorcall_zero_arg , 'get_cached()' )
2785-
27862754 def test_vectorcall_invalid_kwarg (self ):
27872755 err = "unknown argument"
27882756 block = """
@@ -4475,21 +4443,6 @@ def test_vc_new_exact_subclass(self):
44754443 self .assertIsInstance (obj , Sub )
44764444 self .assertIsInstance (obj , ac_tester .VcNewExact )
44774445
4478- def test_vc_new_zeroarg_no_args (self ):
4479- # zero_arg returns Py_None when called with no arguments
4480- result = ac_tester .VcNewZeroArg ()
4481- self .assertIs (result , None )
4482-
4483- def test_vc_new_zeroarg_with_args (self ):
4484- self .assertIsInstance (ac_tester .VcNewZeroArg (1 ), ac_tester .VcNewZeroArg )
4485- self .assertIsInstance (ac_tester .VcNewZeroArg (b = 2 ), ac_tester .VcNewZeroArg )
4486- self .assertIsInstance (ac_tester .VcNewZeroArg (1 , b = 2 ), ac_tester .VcNewZeroArg )
4487-
4488- def test_vc_new_zeroarg_rejects_a_as_keyword (self ):
4489- # 'a' is positional-only
4490- with self .assertRaises (TypeError ):
4491- ac_tester .VcNewZeroArg (a = 1 )
4492-
44934446
44944447class LimitedCAPIOutputTests (unittest .TestCase ):
44954448
0 commit comments