Closed dstansby closed 6 months ago
In general it's good practice to raise an error in tests when a warning is emitted by code. This can be done by adding the following to pyproject.toml:
pyproject.toml
[tool.pytest.ini_options] filterwarnings = [ "error", ]
This serves several purposes:
pytest has tools to catch or filter warnings where they are intended: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
In general it's good practice to raise an error in tests when a warning is emitted by code. This can be done by adding the following to
pyproject.toml
:This serves several purposes:
pytest has tools to catch or filter warnings where they are intended: https://docs.pytest.org/en/stable/how-to/capture-warnings.html