thc*_*ark 14 python pytest pytest-django pyproject.toml
我有一个用 pytest 和诗歌管理的 django 项目。
我想将 pytest 配置放入pyproject.toml文件中,所以我添加了:
[tool.pytest]
filterwarnings = ["ignore::django.utils.deprecation.RemovedInDjango40Warning", "ignore::django.utils.deprecation.RemovedInDjango41Warning"]
Run Code Online (Sandbox Code Playgroud)
然而,这没有什么区别——警告没有被过滤。
如果我添加包含以下内容的 pytest.ini 文件...
[pytest]
filterwarnings =
ignore::django.utils.deprecation.RemovedInDjango40Warning
ignore::django.utils.deprecation.RemovedInDjango41Warning
Run Code Online (Sandbox Code Playgroud)
...效果很好。
我的或我的 pytest 配置有什么问题pyproject.toml,它没有被拾取?
| 归档时间: |
|
| 查看次数: |
9933 次 |
| 最近记录: |