qq 您所在的位置:网站首页 qq机器人api接口 qq

qq

#qq| 来源: 网络整理| 查看: 265

单元测试

代码库提供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 实验室设备网 版权所有