-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpytest.ini
More file actions
29 lines (28 loc) · 857 Bytes
/
pytest.ini
File metadata and controls
29 lines (28 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[pytest]
# 测试用例根目录
testpaths = tests
# 测试文件/类/函数的命名规范
python_files = test_*.py
python_classes = Test*
python_functions = test_*
; # 全局默认执行参数
; addopts = -v
; -s
; -rA
; --durations=0
; --durations-min=1
; --junitxml=reports/pytest.xml
; --cov=ml_maze
; --cov-report=term-missing
; --cov-report=html:reports/coverage/html
; --cov-report=xml:reports/coverage/coverage.xml
# coverage 相关配置(pytest.ini 中直接用 [coverage:run] 段配置)
[coverage:run]
# 覆盖率统计的源码目录(和--cov=ml_maze 一致)
source = ml_maze
# 覆盖率数据文件输出路径
data_file = reports/.coverage
# 排除不需要统计覆盖率的文件
; omit =
; ml_maze/__init__.py
; ml_maze/*_test.py