提供github文件夹的copilot配置模板
This commit is contained in:
13
.github/instructions/testing.instructions.md
vendored
Normal file
13
.github/instructions/testing.instructions.md
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
applyTo: "**/*test*.py"
|
||||
description: "用于自动化测试编写,关键词:pytest、3A、mock、覆盖率、回归"
|
||||
---
|
||||
|
||||
# 自动化测试约束
|
||||
|
||||
- 强制使用 pytest,不使用 unittest 类式风格作为主路径。
|
||||
- 每个测试函数必须显式分段:`# Arrange`、`# Act`、`# Assert`。
|
||||
- 单测必须隔离外部 I/O,网络与第三方调用必须 Mock。
|
||||
- 测试命名应体现“被测对象-场景-预期结果”。
|
||||
- 核心业务逻辑优先保证高覆盖并补齐异常与边界场景。
|
||||
- 参考规范:`04 - Quality & Review/4.1 自动化测试规范.md`。
|
||||
Reference in New Issue
Block a user