add the exception to the result for script unit tests
This commit is contained in:
parent
121f42f2cb
commit
df8ef2e429
|
@ -37,7 +37,14 @@ class ScriptUnitTestRunner:
|
|||
) -> ScriptUnitTestResult:
|
||||
"""Run_task."""
|
||||
task.data = input_context
|
||||
cls._script_engine.execute(task, script)
|
||||
|
||||
try:
|
||||
cls._script_engine.execute(task, script)
|
||||
except Exception as ex:
|
||||
return ScriptUnitTestResult(
|
||||
result=False,
|
||||
error=f"Failed to execute script: {str(ex)}",
|
||||
)
|
||||
|
||||
result_as_boolean = task.data == expected_output_context
|
||||
script_unit_test_result = ScriptUnitTestResult(
|
||||
|
|
Loading…
Reference in New Issue