Nemo2011 / bilibili-api

哔哩哔哩常用API调用。支持视频、番剧、用户、频道、音频等功能。原仓库地址:https://github.com/MoyuScript/bilibili-api
https://nemo2011.github.io/bilibili-api/
GNU General Public License v3.0
2.14k stars 203 forks source link

[建议] 关于 Test #389

Open z0z0r4 opened 1 year ago

z0z0r4 commented 1 year ago

test 这坨说实话很无语...是不是可以直接

async def test_a_User_get_user_info():
    return await u.get_user_info()

换成

result["user"]["get_user_info"] = await u.get_user_info()

这样之类的吗...总觉得定义个函数完全没意义, 以及实际上好像也没法单独测试一个模块

Usage:
    python -m tests.main [options]

Options:
    -m <模块名>:    运行指定测试脚本
    -a:            运行所有测试脚本(以 test_ 开头的)
PS D:\projects\z0z0r4-bilibili-api> python -m tests.test_user
PS D:\projects\z0z0r4-bilibili-api>

根本没有调用...只能 python -m tests.main -a

另外里面的 UID 之类的参数应该单独一个文件拉出来方便修改,不然换测试号得挨个翻

没看过正经的库是咋测试的,没啥思路.jpg

z0z0r4 commented 1 year ago

Api 改完了我都根本没法测试

image

Nemo2011 commented 1 year ago

python3 -m tests.main -m user