-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpytest.ini
More file actions
75 lines (65 loc) · 1.46 KB
/
pytest.ini
File metadata and controls
75 lines (65 loc) · 1.46 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
[tool:pytest]
# pytest 配置文件
# 测试发现
testpaths = tests
python_files = test_*.py *_test.py
python_classes = Test*
python_functions = test_*
# 输出选项
addopts =
-v
--tb=short
--strict-markers
--strict-config
--durations=10
--maxfail=5
--color=yes
# 标记定义
markers =
slow: 标记为慢速测试
integration: 标记为集成测试
unit: 标记为单元测试
stability: 标记为稳定性测试
database: 标记为数据库相关测试
concurrency: 标记为并发相关测试
memory: 标记为内存相关测试
performance: 标记为性能测试
smoke: 标记为冒烟测试
# 异步测试配置
asyncio_mode = auto
# 过滤警告
filterwarnings =
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
ignore::UserWarning:psycopg.*
# 最小版本要求
minversion = 6.0
# 测试超时设置
timeout = 300
# 日志配置
log_cli = true
log_cli_level = INFO
log_cli_format = %(asctime)s [%(levelname)8s] %(name)s: %(message)s
log_cli_date_format = %Y-%m-%d %H:%M:%S
# 覆盖率配置
[coverage:run]
source = src
omit =
*/tests/*
*/test_*
*/__pycache__/*
*/venv/*
*/.venv/*
*/migrations/*
[coverage:report]
exclude_lines =
pragma: no cover
def __repr__
if self.debug:
if settings.DEBUG
raise AssertionError
raise NotImplementedError
if 0:
if __name__ == .__main__.:
class .*\bProtocol\):
@(abc\.)?abstractmethod