-
Notifications
You must be signed in to change notification settings - Fork 0
/
pytest.ini
47 lines (41 loc) · 997 Bytes
/
pytest.ini
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
# pytest.ini
[pytest]
# 测试文件目录
testpaths = tests
# 测试文件匹配模式
python_files = test_*.py
python_classes = Test*
python_functions = test_*
# 日志级别设置
log_cli = true
log_cli_level = INFO
log_cli_format = %(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)
log_cli_date_format = %Y-%m-%d %H:%M:%S
# 测试报告设置
addopts =
--verbose
--showlocals
--tb=short
--cov=src
--cov-report=html
--cov-report=term-missing
# 环境变量设置
env =
PYTHONPATH=.
TESTING=true
DB_URL=sqlite:///tests/test.db
# 标记定义
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
integration: marks tests as integration tests
crawler: marks tests related to crawler functionality
database: marks tests related to database operations
notification: marks tests related to notification system
# 忽略的目录
norecursedirs =
.git
.tox
.env
dist
build
migrations