跳过到内容

运行测试

要运行所有测试,请使用以下命令

pytest

如果找不到 pytest

python -m pytest

运行特定的测试套件

  • 运行时排除集成测试
pytest --without-integration
  • 运行时排除*慢速*集成测试
pytest --without-slow-integration
  • 运行测试并查看覆盖率
pytest --cov=autogpt --without-integration --without-slow-integration

运行 linter

本项目使用 flake8 进行代码检查 (linting)。我们目前使用以下规则:E303,W293,W291,W292,E305,E231,E302。有关更多信息,请参阅 flake8 规则

运行 linter

flake8 .

或者

python -m flake8 .