Skip to content

Commit c1c97f8

Browse files
committed
add test
1 parent 914205b commit c1c97f8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from eval_protocol.models import EvaluationRow, Message
2+
from eval_protocol.pytest import evaluation_test
3+
from eval_protocol.pytest.default_no_op_rollout_processor import NoOpRolloutProcessor
4+
import os
5+
6+
os.environ["EP_INVOCATION_ID"] = "test-invocation-123"
7+
8+
@evaluation_test(
9+
input_rows=[[EvaluationRow(messages=[Message(role="user", content="What is the capital of France?")])]],
10+
completion_params=[{"model": "no-op"}],
11+
rollout_processor=NoOpRolloutProcessor(),
12+
mode="pointwise",
13+
)
14+
def test_input_messages_in_decorator(row: EvaluationRow) -> EvaluationRow:
15+
"""Run math evaluation on sample dataset using pytest interface."""
16+
assert row.messages[0].content == "What is the capital of France?"
17+
assert row.execution_metadata.invocation_id == "test-invocation-123"
18+
return row

0 commit comments

Comments
 (0)