Skip to content

Commit 22a6893

Browse files
committed
Fix pytest valgrind warnings
1 parent f15f573 commit 22a6893

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

Tests/conftest.py

+8-10
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@ def pytest_configure(config):
1919
# We're marking some tests to ignore valgrind errors and XFAIL them.
2020
# Ensure that the mark is defined
2121
# even in cases where pytest-valgrind isn't installed
22-
23-
with warnings.catch_warnings():
24-
warnings.simplefilter("error")
25-
try:
26-
getattr(pytest.mark, "valgrind_known_error")
27-
except Exception:
28-
config.addinivalue_line(
29-
"markers",
30-
"valgrind_known_error: Tests that have known issues with valgrind",
31-
)
22+
try:
23+
config.addinivalue_line(
24+
"markers",
25+
"valgrind_known_error: Tests that have known issues with valgrind",
26+
)
27+
except Exception:
28+
# valgrind is already installed
29+
pass

0 commit comments

Comments
 (0)