mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-03 05:44:44 +08:00
test(agent): update evaluation scenario contract
This commit is contained in:
@@ -30,14 +30,14 @@ def _download_body(world: EvaluationWorld) -> dict[str, Any]:
|
||||
def test_scenarios_expose_inputs_without_initial_state_or_oracle() -> None:
|
||||
"""公开定义只有任务、业务身份及资源,答案和故障时序不能进入模型上下文。"""
|
||||
scenarios = list_scenarios()
|
||||
assert len(scenarios) == 9
|
||||
assert len(scenarios) == 10
|
||||
api_scenarios = [scenario for scenario in scenarios if scenario.kind == "api"]
|
||||
assert len(api_scenarios) == 5
|
||||
assert len(api_scenarios) == 6
|
||||
assert len({scenario.media_id for scenario in api_scenarios}) == 5
|
||||
for scenario in scenarios:
|
||||
assert set(asdict(scenario)) == {
|
||||
"scenario_id", "task", "media_source", "media_id", "title", "magnet", "infohash",
|
||||
"kind", "command", "browser_url", "terminal_use_pty",
|
||||
"kind", "command", "browser_url", "terminal_use_pty", "steering_message",
|
||||
}
|
||||
assert "JSON" in scenario.task
|
||||
assert scenario.scenario_id not in scenario.task
|
||||
@@ -47,6 +47,10 @@ def test_scenarios_expose_inputs_without_initial_state_or_oracle() -> None:
|
||||
assert scenario.command == ""
|
||||
assert scenario.browser_url == ""
|
||||
assert scenario.terminal_use_pty is None
|
||||
if scenario.scenario_id == "steering_long_context":
|
||||
assert scenario.steering_message
|
||||
else:
|
||||
assert scenario.steering_message == ""
|
||||
elif scenario.kind == "command":
|
||||
assert scenario.command
|
||||
assert scenario.browser_url == ""
|
||||
|
||||
Reference in New Issue
Block a user