-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpytest.ini
More file actions
34 lines (31 loc) · 1.21 KB
/
pytest.ini
File metadata and controls
34 lines (31 loc) · 1.21 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
[pytest]
# 日志配置
log_cli = True
log_cli_level = INFO
# 警告过滤规则
filterwarnings =
# 过滤第三方库警告
ignore::DeprecationWarning:pydantic.*:
ignore::DeprecationWarning:fastapi.*:
ignore::DeprecationWarning:starlette.*:
ignore::DeprecationWarning:importlib.*:
ignore::DeprecationWarning:docling_core.*:
ignore::DeprecationWarning:litellm.*:
ignore::pytest.PytestDeprecationWarning:pytest_asyncio.*:
ignore::urllib3.exceptions.InsecureRequestWarning
ignore::RuntimeWarning:httpx.*:
ignore::ResourceWarning:httpx.*:
ignore::RuntimeWarning:asyncio.*:
# 过滤特定弃用警告
ignore:.*on_event is deprecated.*:DeprecationWarning
ignore:\s+on_event is deprecated, use lifespan event handlers instead\.\s+:DeprecationWarning
# 精确过滤FastAPI的on_event警告(针对特定文件中的行)
ignore::DeprecationWarning:src/oculith/api/endpoints.py:152
ignore::DeprecationWarning:src/oculith/api/endpoints.py:229
# 保留自定义代码警告
default::ResourceWarning:oculith.*:
default::RuntimeWarning:oculith.*:
default::UserWarning:oculith.*:
default::DeprecationWarning:oculith.*:
# 测试配置
asyncio_mode = auto