您所在的位置:网站首页 › qq机器人api接口 › qq |
单元测试
代码库提供API接口测试和 websocket 的单测用例,位于 tests 目录中。如果需要自己运行,可以在 tests 目录重命名 .test.yaml 文件后添加自己的测试参数启动测试: # test yaml 用于设置test相关的参数,开源版本需要去掉参数 token: appid: "xxx" token: "xxxxx" test_params: guild_id: "xx" guild_owner_id: "xx" guild_owner_name: "xx" guild_test_member_id: "xx" guild_test_role_id: "xx" channel_id: "xx" channel_name: "xx" robot_name: "xxx" is_sandbox: False单测执行方法: 先确保已安装 pytest : pip install pytest然后在项目根目录下执行单测: pytest |
CopyRight 2018-2019 实验室设备网 版权所有 |