fix(benchmark): Fix `TestResult.fail_reason` assignment condition
The condition must be the same as for `success`, because otherwise it causes a crash when `call.excinfo` evaluates to `False` but is not `None`.pull/6857/head
parent
83fcd9ad16
commit
63e6014b27
|
@ -90,7 +90,7 @@ def add_test_result_to_report(
|
|||
TestResult(
|
||||
success=call.excinfo is None,
|
||||
run_time=f"{str(round(call.duration, 3))} seconds",
|
||||
fail_reason=str(call.excinfo.value) if call.excinfo else None,
|
||||
fail_reason=None if call.excinfo is None else str(call.excinfo.value),
|
||||
reached_cutoff=user_properties.get("timed_out", False),
|
||||
n_steps=user_properties.get("n_steps"),
|
||||
cost=user_properties.get("agent_task_cost"),
|
||||
|
|
Loading…
Reference in New Issue