diff --git a/pyproject.toml b/pyproject.toml index 77f122e6..aa16ac69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -140,7 +140,15 @@ disable = [ [tool.pytest.ini_options] testpaths = ["pytests"] -addopts = "-W=all -Werror -Wdefault::DeprecationWarning -Wdefault::PendingDeprecationWarning -vv" +addopts = "-vv" +filterwarnings = [ + "error", + "once::DeprecationWarning", + "once::PendingDeprecationWarning", + # We use a raw string (single quote) to avoid the need to escape special + # chars as this is a regex + 'ignore:Protobuf gencode version .*exactly one major version older.*:UserWarning', +] [tool.mypy] explicit_package_bases = true