#NEWLINE# def test_reduction_to_scalar( ctx ) : #NEWLINE# #INDENT# result = odo ( ctx . sql ( 'select sum(amount) from t' ) , float ) #NEWLINE# assert isinstance ( result , float ) #NEWLINE# assert ( ctx == sum ( map ( toolz . second , data ) ) )