def test_str_cat_where_clause(sql_with_null):
 t = symbol('t', discover(sql_with_null))
 s = t[(t.amount <= 200)]
 c1 = s.comment.str_cat(s.sex, sep=' -- ')
 bres = compute(c1, sql_with_null, return_type=pd.Series)
 df_s = compute(s, sql_with_null, return_type=pd.DataFrame)
 exp = df_s.comment.str.cat(df_s.sex, ' -- ')
 assert all((exp[(~ exp.isnull())] == bres[(~ bres.isnull())]))
 assert all((exp[exp.isnull()].index == bres[bres.isnull()].index))

def test_str_cat_where_clause ( sql_with_null ) : t = symbol ( 't' , discover ( sql_with_null ) ) s = t [ ( t . amount <= 200 ) ] c1 = s . comment . str_cat ( s . sex , sep = ' -- ' ) bres = compute ( c1 , sql_with_null , return_type = pd . Series ) df_s = compute ( s , sql_with_null , return_type = pd . DataFrame ) exp = df_s . comment . str . cat ( df_s . sex , ' -- ' ) assert all ( ( exp [ ( ~ exp . isnull ( ) ) ] == bres [ ( ~ bres . isnull ( ) ) ] ) ) assert all ( ( exp [ exp . isnull ( ) ] . index == bres [ bres . isnull ( ) ] . index ) )
invokes the path for compute_up .