@@ -1567,29 +1567,28 @@ def _reference_seq_repeat(args):
15671567 case _:
15681568 return args [0 ] * args [1 ]
15691569
1570- if not os .environ .get ('BYTECODE_DSL_INTERPRETER' ): # TODO: class pattern matching
1571- test_PySequence_Repeat = CPyExtFunction (
1572- _reference_seq_repeat ,
1573- lambda : (
1574- ((1 ,), 0 ),
1575- ((1 ,), 1 ),
1576- ((1 ,), 3 ),
1577- ([1 ], 0 ),
1578- ([1 ], 1 ),
1579- ([1 ], 3 ),
1580- ("hello" , 0 ),
1581- ("hello" , 1 ),
1582- ("hello" , 3 ),
1583- ({}, 0 ),
1584- (SeqWithMulAdd (), 42 ),
1585- (NonSeqWithMulAdd (), 24 ),
1586- (DictSubclassWithSequenceMethods (), 5 ),
1587- ),
1588- resultspec = "O" ,
1589- argspec = 'On' ,
1590- arguments = ["PyObject* obj" , "Py_ssize_t n" ],
1591- cmpfunc = unhandled_error_compare
1592- )
1570+ test_PySequence_Repeat = CPyExtFunction (
1571+ _reference_seq_repeat ,
1572+ lambda : (
1573+ ((1 ,), 0 ),
1574+ ((1 ,), 1 ),
1575+ ((1 ,), 3 ),
1576+ ([1 ], 0 ),
1577+ ([1 ], 1 ),
1578+ ([1 ], 3 ),
1579+ ("hello" , 0 ),
1580+ ("hello" , 1 ),
1581+ ("hello" , 3 ),
1582+ ({}, 0 ),
1583+ (SeqWithMulAdd (), 42 ),
1584+ (NonSeqWithMulAdd (), 24 ),
1585+ (DictSubclassWithSequenceMethods (), 5 ),
1586+ ),
1587+ resultspec = "O" ,
1588+ argspec = 'On' ,
1589+ arguments = ["PyObject* obj" , "Py_ssize_t n" ],
1590+ cmpfunc = unhandled_error_compare
1591+ )
15931592
15941593 test_PySequence_InPlaceRepeat = CPyExtFunction (
15951594 lambda args : args [0 ] * args [1 ],
@@ -1622,35 +1621,34 @@ def _reference_seq_concat(args):
16221621 case _:
16231622 return args [0 ] + args [1 ]
16241623
1625- if not os .environ .get ('BYTECODE_DSL_INTERPRETER' ): # TODO: class pattern matching
1626- test_PySequence_Concat = CPyExtFunction (
1627- _reference_seq_concat ,
1628- lambda : (
1629- ((1 ,), tuple ()),
1630- ((1 ,), list ()),
1631- ((1 ,), (2 ,)),
1632- ((1 ,), [2 ,]),
1633- ([1 ], tuple ()),
1634- ([1 ], list ()),
1635- ([1 ], (2 ,)),
1636- ([1 ], [2 ,]),
1637- ("hello" , "world" ),
1638- ("hello" , "" ),
1639- ({}, []),
1640- ([], {}),
1641- (SeqWithMulAdd (), 1 ),
1642- (SeqWithMulAdd (), SeqWithMulAdd ()),
1643- (SeqWithMulAdd (), [1 ,2 ,3 ]),
1644- (NonSeqWithMulAdd (), 2 ),
1645- (NonSeqWithMulAdd (), [1 ,2 ,3 ]),
1646- (DictSubclassWithSequenceMethods (), (1 ,2 ,3 )),
1647- ((1 ,2 ,3 ), DictSubclassWithSequenceMethods ()),
1648- ),
1649- resultspec = "O" ,
1650- argspec = 'OO' ,
1651- arguments = ["PyObject* s" , "PyObject* o" ],
1652- cmpfunc = unhandled_error_compare
1653- )
1624+ test_PySequence_Concat = CPyExtFunction (
1625+ _reference_seq_concat ,
1626+ lambda : (
1627+ ((1 ,), tuple ()),
1628+ ((1 ,), list ()),
1629+ ((1 ,), (2 ,)),
1630+ ((1 ,), [2 ,]),
1631+ ([1 ], tuple ()),
1632+ ([1 ], list ()),
1633+ ([1 ], (2 ,)),
1634+ ([1 ], [2 ,]),
1635+ ("hello" , "world" ),
1636+ ("hello" , "" ),
1637+ ({}, []),
1638+ ([], {}),
1639+ (SeqWithMulAdd (), 1 ),
1640+ (SeqWithMulAdd (), SeqWithMulAdd ()),
1641+ (SeqWithMulAdd (), [1 ,2 ,3 ]),
1642+ (NonSeqWithMulAdd (), 2 ),
1643+ (NonSeqWithMulAdd (), [1 ,2 ,3 ]),
1644+ (DictSubclassWithSequenceMethods (), (1 ,2 ,3 )),
1645+ ((1 ,2 ,3 ), DictSubclassWithSequenceMethods ()),
1646+ ),
1647+ resultspec = "O" ,
1648+ argspec = 'OO' ,
1649+ arguments = ["PyObject* s" , "PyObject* o" ],
1650+ cmpfunc = unhandled_error_compare
1651+ )
16541652
16551653 test_PySequence_InPlaceConcat = CPyExtFunction (
16561654 lambda args : args [0 ] + list (args [1 ]) if isinstance (args [0 ], list ) else args [0 ] + args [1 ],
0 commit comments