Skip to content
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

单元测试工具链 #9

Open
Guo-Zhang opened this issue Dec 13, 2023 · 0 comments
Open

单元测试工具链 #9

Guo-Zhang opened this issue Dec 13, 2023 · 0 comments

Comments

@Guo-Zhang
Copy link
Member

Guo-Zhang commented Dec 13, 2023

单元测试工具链

静态:

formaters

ruff: all in one
Flake8(https://flake8.pycqa.org/en/latest/): 静态分析
Black(https://black.readthedocs.io/en/stable/): 自动格式化
isort(https://pycqa.github.io/isort/): import排序

typer

Mypy(https://mypy.readthedocs.io/en/stable/): 类型检查

动态:

Pytest(https://docs.pytest.org/en/7.4.x/): 测试
coverage(): 测试覆盖率
Tox: 多版本

pytest

关于Scope的用法:https://pytest-with-eric.com/pytest-advanced/pytest-fixture-scope/

插件

https://pytest-dependency.readthedocs.io/en/stable/about.html

对分层架构的项目,特别是Web项目,用处比较大。

mypy

解决pre-commit配置异常的方法:
https://stackoverflow.com/questions/73485677/pre-commit-mypy-local-hook-reports-the-same-error-multiple-times

@Guo-Zhang Guo-Zhang changed the title 测试工具 单元测试工具链 Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant