Fix pytest valgrind warnings

This commit is contained in:
Eric Soroos 2021-03-11 23:13:15 +01:00
parent f15f573e51
commit 22a6893364

View File

@ -19,13 +19,11 @@ def pytest_configure(config):
# We're marking some tests to ignore valgrind errors and XFAIL them.
# Ensure that the mark is defined
# even in cases where pytest-valgrind isn't installed
with warnings.catch_warnings():
warnings.simplefilter("error")
try:
getattr(pytest.mark, "valgrind_known_error")
except Exception:
config.addinivalue_line(
"markers",
"valgrind_known_error: Tests that have known issues with valgrind",
)
try:
config.addinivalue_line(
"markers",
"valgrind_known_error: Tests that have known issues with valgrind",
)
except Exception:
# valgrind is already installed
pass