Skip to content

Commit 92cd591

Browse files
committed
make anything decorated with @evaluation_test pytest discoverable
1 parent 503665c commit 92cd591

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

eval_protocol/pytest/evaluation_test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,11 @@ async def _collect_result(config, lst):
713713
test_func, mode, max_concurrent_rollouts, max_concurrent_evaluations, pytest_wrapper
714714
)
715715

716+
# Make this pytest discoverable regardless of pytest configuration. So
717+
# you can name your eval whatever you want, as long as it's decorated
718+
# with @evaluation_test.
719+
dual_mode_wrapper.__test__ = True
720+
716721
return dual_mode_wrapper # pyright: ignore[reportReturnType, reportUnknownVariableType]
717722

718723
return decorator

0 commit comments

Comments
 (0)