#NEWLINE# def test_recursive_rowfunc_is_used( ) : #NEWLINE# #INDENT# expr = by ( t [ 'name' ] , total = ( 2 * ( t [ 'amount' ] + t [ 'id' ] ) ) . sum ( ) ) #NEWLINE# expected = [ ( 'Alice' , ( 2 * ( 101 + 53 ) ) ) , ( 'Bob' , ( 2 * 202 ) ) ] #NEWLINE# assert ( set ( compute ( expr , data ) ) == set ( expected ) )