mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2025-07-29 22:09:50 +00:00
✨ 更新函数调用模型,添加同步函数类型支持;重构函数信息获取逻辑;新增示例测试用例
Some checks failed
Deploy VitePress site to Pages / build (push) Failing after 38s
Pre-commit checks / pre-commit (3.11) (push) Successful in 2m40s
Pre-commit checks / pre-commit (3.10) (push) Successful in 3m19s
Pre-commit checks / pre-commit (3.12) (push) Successful in 3m19s
Pre-commit checks / pre-commit (3.13) (push) Successful in 3m23s
Pytest API Testing / Pytest (3.11) (push) Failing after 2m10s
Pytest API Testing / Pytest (3.10) (push) Failing after 2m51s
Pytest API Testing / Pytest (3.12) (push) Failing after 2m46s
Pytest API Testing / Pytest (3.13) (push) Failing after 2m39s
Some checks failed
Deploy VitePress site to Pages / build (push) Failing after 38s
Pre-commit checks / pre-commit (3.11) (push) Successful in 2m40s
Pre-commit checks / pre-commit (3.10) (push) Successful in 3m19s
Pre-commit checks / pre-commit (3.12) (push) Successful in 3m19s
Pre-commit checks / pre-commit (3.13) (push) Successful in 3m23s
Pytest API Testing / Pytest (3.11) (push) Failing after 2m10s
Pytest API Testing / Pytest (3.10) (push) Failing after 2m51s
Pytest API Testing / Pytest (3.12) (push) Failing after 2m46s
Pytest API Testing / Pytest (3.13) (push) Failing after 2m39s
This commit is contained in:
20
tests/test_plugin.py
Normal file
20
tests/test_plugin.py
Normal file
@ -0,0 +1,20 @@
|
||||
def example_function(num: int, text: str, is_a: bool) -> str:
|
||||
"""这是一个示例描述
|
||||
|
||||
Args:
|
||||
num (int): 描述整数
|
||||
text (str): 文本类型
|
||||
is_a (bool): 布尔类型
|
||||
|
||||
Returns:
|
||||
str: 消息
|
||||
"""
|
||||
return "-"
|
||||
|
||||
|
||||
class TestPlugin:
|
||||
def test_get_function_info(self):
|
||||
from nonebot_plugin_marshoai.plugin import get_function_info
|
||||
|
||||
func_info = get_function_info(example_function)
|
||||
print(func_info)
|
Reference in New Issue
Block a user