Silence Pytest DeprecationWarning

Pytest ≥ 3.8 by default: show DeprecationWarning and PendingDeprecationWarning.

This warning clutter can be filtered by adding to “pyproject.toml” in the top-level project directory:

filterwarnings =

We might choose to suppress DeprecationWarning in a repo’s test suite because the warnings are coming from modules developed by others (e.g. Numpy or Xarray).

However, don’t be too carte blanche about suppressing DeprecationWarning, it might be from your packages.

Related: find source of PyTest warning