13 lines
537 B
Python
13 lines
537 B
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
临时测试脚本:直接调用 FunctionExecutor 执行 apps/calculate 函数
|
|
用于验证子进程脚本 JSON 输出与解析是否正常
|
|
"""
|
|
from utils.function_executor import function_executor
|
|
|
|
if __name__ == "__main__":
|
|
# 函数级注释:测试 calculate 的乘法
|
|
# 期望返回:{"status":"success","result":{"operation":"multiply","result":15}}
|
|
args = {"num1": 5, "num2": 3, "operation": "multiply"}
|
|
result = function_executor.execute_function("calculate", args)
|
|
print(result) |