-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: 优化测试 #317
Comments
关于call_api我们是否需要也人类格式化一下,即储存一个api call列表,很多时候data不重要,而是call的api名字,用snapshot生成 |
可能json或者dict也可以通过节选key来精简化,而非snapshot梭哈 |
测试的修改无非是人类可视化和编写测试方便化两个方向,我们可以两头下功夫,讨论讨论 |
支持,重要是 api 名字和顺序。 |
我觉得还是需要 snapshot 完整内容来兜底,避免缺一些我们暂时没用到的东西。免得后面用到的时候发现原来在某一次修改中改错了。 精简和节选也可以一起做,类似于重点关注。 |
我觉得可以 |
在之前的 PR 中尝试了两个简化方法,看起来还不错。 noneflow/tests/plugins/github/utils.py Lines 19 to 38 in 614ef9b
should_call_apisnoneflow/tests/plugins/github/resolve/test_resolve_pull_request.py Lines 64 to 108 in 614ef9b
assert_subprocess_run_callsnoneflow/tests/plugins/github/resolve/test_resolve_pull_request.py Lines 112 to 150 in 614ef9b
|
优化 mock 体验
提供统一且方便组合的 mock 体验,目前需要涉及到以下内容:
优化 snapshot 体验
The text was updated successfully, but these errors were encountered: