Skip to content

Improve pytest warning filtering #407

@llucax

Description

@llucax

What's needed?

We need to easily filter out protobuf version warnings.

Proposed solution

[tool.pytest.ini_options]
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',
]

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    part:pytestAffects the configuration of pytestpart:templateAffects the cookiecutter template filestype:enhancementNew feature or enhancement visitble to users

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions