Skip to content

Commit dd56d56

Browse files
chore: filter warning about gencode version being one version older
Signed-off-by: Matthias Wende <[email protected]>
1 parent a7864af commit dd56d56

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

pyproject.toml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,22 @@ disable = [
171171
]
172172

173173
[tool.pytest.ini_options]
174-
addopts = "-W=all -Werror -Wdefault::DeprecationWarning -Wdefault::PendingDeprecationWarning -vv"
174+
addopts = "-vv"
175175
testpaths = ["tests", "src"]
176176
asyncio_default_fixture_loop_scope = "function"
177177
asyncio_mode = "auto"
178178
required_plugins = ["pytest-asyncio", "pytest-mock"]
179+
filterwarnings = [
180+
"error",
181+
"once::DeprecationWarning",
182+
"once::PendingDeprecationWarning",
183+
# We ignore warnings about protobuf gencode version being one version older
184+
# than the current version, as this is supported by protobuf, and we expect to
185+
# have such cases. If we go too far, we will get a proper error anyways.
186+
# We use a raw string (single quotes) to avoid the need to escape special
187+
# characters as this is a regex.
188+
'ignore:Protobuf gencode version .*exactly one major version older.*:UserWarning',
189+
]
179190

180191
[tool.mypy]
181192
explicit_package_bases = true

0 commit comments

Comments
 (0)