File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3262,8 +3262,6 @@ def test_vectorcall_on_init(self):
32623262 class Foo "FooObject *" "Foo_Type"
32633263 @vectorcall
32643264 Foo.__init__
3265- iterable: object = NULL
3266- /
32673265 """
32683266 func = self .parse_function (block , signatures_in_block = 3 ,
32693267 function_index = 2 )
@@ -3294,14 +3292,16 @@ class Foo "FooObject *" "Foo_Type"
32943292 self .expect_failure (block , err , lineno = 2 )
32953293
32963294 def test_vectorcall_without_type_object (self ):
3297- err = "@vectorcall requires the type object of 'Foo'"
3295+ # Heap types have no C pointer to name, so the type object is optional.
32983296 block = """
32993297 module m
33003298 class Foo "FooObject *" ""
33013299 @vectorcall
33023300 Foo.__init__
33033301 """
3304- self .expect_failure (block , err , lineno = 3 )
3302+ func = self .parse_function (block , signatures_in_block = 3 ,
3303+ function_index = 2 )
3304+ self .assertTrue (func .vectorcall )
33053305
33063306 def test_vectorcall_unsupported_converter (self ):
33073307 # str(encoding=...) has no parse_arg() implementation.
You can’t perform that action at this time.
0 commit comments