diff --git a/Tests/conftest.py b/Tests/conftest.py index 6f9945204..dd37e7ce5 100644 --- a/Tests/conftest.py +++ b/Tests/conftest.py @@ -1,7 +1,4 @@ import io -import warnings - -import pytest def pytest_report_header(config): @@ -19,13 +16,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