mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
21 lines
732 B
Python
21 lines
732 B
Python
import platform
|
|
|
|
from astrbot.core.tools.computer_tools.python import LocalPythonTool, PythonTool
|
|
|
|
|
|
def test_python_tool_description_contains_os():
|
|
"""测试 PythonTool 的描述中是否包含当前操作系统信息"""
|
|
tool = PythonTool()
|
|
current_os = platform.system()
|
|
assert current_os in tool.description
|
|
assert "IPython" in tool.description
|
|
|
|
|
|
def test_local_python_tool_description_contains_os():
|
|
"""测试 LocalPythonTool 的描述中是否包含当前操作系统信息和兼容性提示"""
|
|
tool = LocalPythonTool()
|
|
current_os = platform.system()
|
|
assert current_os in tool.description
|
|
assert "Python environment" in tool.description
|
|
assert "system-compatible" in tool.description
|