We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
单元测试:和代码模块一一对应。
分层工具 import-linter:https://mp.weixin.qq.com/s/_4rrJfPmchwSBN0qDRpSfA
The text was updated successfully, but these errors were encountered:
poetry是目前社区用的最多的管理工具之一,它的主要好处是提供了类似于npm的完整功能,对于打包项目、虚拟环境管理等比较友好
关于单元测试。
tests/文件夹,按照模块划分的方式组织即可,比如tests/XAgent/test_config,模块名带test、函数名带test,会被测试框架自动识别为测试
如果后续计划添加集成测试,可以增加integrated_tests/ 。主要区别在于,单元测试使用mock等方式替代网络、数据库等真实依赖。
关于CI。我增加了一个GitHub Actions,每次PR到主分支会运行单元测试。如果测试覆盖率提高,开发者每次更新都会得到比较完善的检查。静态检查等工具后续也可以逐渐加起来(没加的原因是目前代码问题太多,检查肯定没法通过)。此外再进一步地可以用pre-commit,把这些验证过程前置到每次提交。
Sorry, something went wrong.
No branches or pull requests
单元测试:和代码模块一一对应。
分层工具 import-linter:https://mp.weixin.qq.com/s/_4rrJfPmchwSBN0qDRpSfA
The text was updated successfully, but these errors were encountered: