Skip to content

Commit c632efe

Browse files
committed
fix ut
1 parent 8c1c254 commit c632efe

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

eval_protocol/pytest/evaluation_test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ async def _execute_eval_with_semaphore(**kwargs):
595595
if "row" in kwargs:
596596
result = await execute_with_params(
597597
test_func,
598-
processed_row=kwargs["rows"],
598+
processed_row=kwargs["row"],
599599
evaluation_test_kwargs=kwargs.get("evaluation_test_kwargs") or {},
600600
)
601601
if result is None or not isinstance(result, EvaluationRow):
@@ -805,15 +805,14 @@ async def dual_mode_wrapper(*args, **kwargs):
805805
return await pytest_wrapper(*args, **kwargs)
806806

807807
dual_mode_wrapper._origin_func = test_func
808-
dual_mode_wrapper._evaluator_id = test_func.__name__
809808
# Generate (stable) evaluator ID from function source code hash
810809
try:
811810
func_source = inspect.getsource(test_func)
812811
parsed = ast.parse(func_source)
813812
normalized_source = ast.unparse(parsed)
814813
clean_source = "".join(normalized_source.split()) + test_func.__name__
815814
func_hash = hashlib.sha256(clean_source.encode("utf-8")).hexdigest()[:12]
816-
dual_mode_wrapper._version = f"{test_func.__name__}_{func_hash}"
815+
dual_mode_wrapper._evaluator_id= f"{test_func.__name__}_{func_hash}"
817816
except (OSError, TypeError, SyntaxError):
818817
pass
819818
dual_mode_wrapper._metainfo = {

tests/pytest/test_get_metadata.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,5 @@ def test_pytest_func_metainfo():
3636
# Test evaluator ID generation
3737
assert hasattr(test_pytest_async, "_evaluator_id")
3838
evaluator_id = test_pytest_async._evaluator_id
39-
assert evaluator_id.startswith("eval_")
40-
assert len(evaluator_id) == 17 # "eval_" + 12 character hash
39+
assert evaluator_id.startswith("test_pytest_async")
4140
print(f"Generated evaluator ID: {evaluator_id}")

0 commit comments

Comments
 (0)