refactor(tests): 重构测试代码并优化ruff检查规则

1.  在pyproject.toml中为测试文件添加ARG001和ARG002规则忽略
2.  重构多个CLI测试文件,移除冗余的mock断言、导入顺序调整
3.  统一测试用例的帮助信息输出逻辑,移除SystemExit捕获,简化测试流程
4.  拆分合并冗余的测试类,按功能细化测试用例
5.  移除测试代码中多余的注释和pytest导入
This commit is contained in:
2026-06-22 12:18:10 +08:00
parent d4a1a5c2de
commit 413ab40044
13 changed files with 616 additions and 953 deletions
+3
View File
@@ -148,6 +148,9 @@ select = [
"W", # pycodestyle warnings
]
[tool.ruff.lint.per-file-ignores]
"**/tests/**" = ["ARG001", "ARG002"]
[tool.pyrefly]
preset = "basic"
project-includes = ["**/*.ipynb", "**/*.py*"]