I have a django project managed with pytest and poetry.
I'd like to put my pytest config into the pyproject.toml
file, so I added:
[tool.pytest]
filterwarnings = ["ignore::django.utils.deprecation.RemovedInDjango40Warning", "ignore::django.utils.deprecation.RemovedInDjango41Warning"]
However, this made no difference - the warning weren't filtered.
If I add a pytest.ini file containing the following...
[pytest]
filterwarnings =
ignore::django.utils.deprecation.RemovedInDjango40Warning
ignore::django.utils.deprecation.RemovedInDjango41Warning
... it works just fine.
What's wrong with my pyproject.toml
, or my pytest configuration, that it's not being picked up?