@@ -1956,10 +1956,10 @@ def the_sum(s1, s2, x):
19561956
19571957 args1 = (1 ,)
19581958
1959- # Fails to apply on dataframe with incompatible number of columns.
1959+ # Fails to apply on dataframe with incompatible number of columns and args .
19601960 with pytest .raises (
19611961 ValueError ,
1962- match = "^Parameter count mismatch:.* expected 3 parameters but received 4 values.* " ,
1962+ match = "^Parameter count mismatch:.* expected 3 parameters but received 4 values \\ (2 DataFrame columns and 2 args \\ ) " ,
19631963 ):
19641964 scalars_df [columns ].apply (
19651965 the_sum_mf ,
@@ -2308,12 +2308,12 @@ def foo(x, y, z):
23082308 # Fails to apply on dataframe with incompatible number of columns
23092309 with pytest .raises (
23102310 ValueError ,
2311- match = "^Parameter count mismatch:.* expected 3 parameters but received 2 DataFrame.* " ,
2311+ match = "^Parameter count mismatch:.* expected 3 parameters but received 2 DataFrame columns. " ,
23122312 ):
23132313 bf_df [["Id" , "Age" ]].apply (foo , axis = 1 )
23142314 with pytest .raises (
23152315 ValueError ,
2316- match = "^Parameter count mismatch:.* expected 3 parameters but received 4 DataFrame.* " ,
2316+ match = "^Parameter count mismatch:.* expected 3 parameters but received 4 DataFrame columns. " ,
23172317 ):
23182318 bf_df .assign (Country = "lalaland" ).apply (foo , axis = 1 )
23192319
@@ -2392,12 +2392,12 @@ def foo(x, y, z):
23922392 # Fails to apply on dataframe with incompatible number of columns
23932393 with pytest .raises (
23942394 ValueError ,
2395- match = "^Parameter count mismatch:.* expected 3 parameters but received 2 DataFrame.* " ,
2395+ match = "^Parameter count mismatch:.* expected 3 parameters but received 2 DataFrame columns. " ,
23962396 ):
23972397 bf_df [["Id" , "Age" ]].apply (foo , axis = 1 )
23982398 with pytest .raises (
23992399 ValueError ,
2400- match = "^Parameter count mismatch:.* expected 3 parameters but received 4 DataFrame.* " ,
2400+ match = "^Parameter count mismatch:.* expected 3 parameters but received 4 DataFrame columns. " ,
24012401 ):
24022402 bf_df .assign (Country = "lalaland" ).apply (foo , axis = 1 )
24032403
0 commit comments