MCPcopy Create free account
hub / github.com/Mercury7353/PyBench / check_content

Function check_content

data/unit_test/enter_point.py:7–19  ·  view source on GitHub ↗

根据task_id匹配并运行相应的单元测试函数。

(task_id,trajectory)

Source from the content-addressed store, hash-verified

5import json
6
7def check_content(task_id,trajectory):
8 '''
9 根据task_id匹配并运行相应的单元测试函数。
10 '''
11 # 构建测试函数的名称
12 test_function_name = f'test_task_{task_id}'
13 if not test_function_name:
14 print(f"No tests found for task_id {task_id}")
15 return
16
17
18 unit_test=getattr(tests, test_function_name)
19 unit_test(trajectory)
20
21# 示例调用
22if __name__=="__main__":

Callers 1

enter_point.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected