playbook/.agents/python/testing.md

14 lines
467 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 测试Testing
本文件定义代理在测试相关工作的最低要求Python
## 原则
- 优先增加与变更直接相关的测试(回归测试优先)。
- 测试应可重复运行、无顺序依赖、尽量避免真实网络/真实环境依赖。
## 约定(模板)
- 若项目使用 `pytest`:遵循 `pyproject.toml` 中的 `pytest.ini_options` 配置。
- I/O 相关代码建议使用临时目录与 mock避免污染工作区。