我有一个django项目,由pytest和poetry管理
我想将pytest配置放入pyproject.toml
文件中,因此我添加了:
[tool.pytest]
filterwarnings = ["ignore::django.utils.deprecation.RemovedInDjango40Warning", "ignore::django.utils.deprecation.RemovedInDjango41Warning"]
然而,这没有什么区别——警告没有被过滤
如果我添加一个包含以下内容的pytest.ini文件
[pytest]
filterwarnings =
ignore::django.utils.deprecation.RemovedInDjango40Warning
ignore::django.utils.deprecation.RemovedInDjango41Warning
。。。它很好用
我的pyproject.toml
或我的pytest配置有什么问题,它没有被拾取
根据pytest's docs,节名应为
[tool.pytest.ini_options]
相关问题 更多 >
编程相关推荐