@@ -19,23 +19,25 @@ async def execute_pytest(
1919 raise ValueError ("'row' is a reserved parameter for the evaluation function" )
2020 if "rows" in evaluation_test_kwargs :
2121 raise ValueError ("'rows' is a reserved parameter for the evaluation function" )
22+ else :
23+ evaluation_test_kwargs = {}
2224
2325 # Handle both sync and async test functions
2426 if asyncio .iscoroutinefunction (test_func ):
2527 if processed_row is not None :
2628 test_func = cast (Callable [[EvaluationRow ], Awaitable [EvaluationRow ]], test_func )
27- return await test_func (processed_row )
29+ return await test_func (processed_row , ** evaluation_test_kwargs )
2830 if processed_dataset is not None :
2931 test_func = cast (Callable [[list [EvaluationRow ]], Awaitable [list [EvaluationRow ]]], test_func )
30- return await test_func (processed_dataset )
32+ return await test_func (processed_dataset , ** evaluation_test_kwargs )
3133 test_func = cast (Callable [[], Awaitable [EvaluationRow ]], test_func )
32- return await test_func ()
34+ return await test_func (** evaluation_test_kwargs )
3335 else :
3436 if processed_row is not None :
3537 test_func = cast (Callable [[EvaluationRow ], EvaluationRow ], test_func )
36- return test_func (processed_row )
38+ return test_func (processed_row , ** evaluation_test_kwargs )
3739 if processed_dataset is not None :
3840 test_func = cast (Callable [[Dataset ], Dataset ], test_func )
39- return test_func (processed_dataset )
41+ return test_func (processed_dataset , ** evaluation_test_kwargs )
4042 test_func = cast (Callable [[], EvaluationRow ], test_func )
41- return test_func ()
43+ return test_func (** evaluation_test_kwargs )
0 commit comments