From f546df40cfc43ac5c8c23d3877587ad7df7713d0 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 30 Dec 2020 14:41:22 +1100 Subject: [PATCH] Lint fixes --- Tests/conftest.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Tests/conftest.py b/Tests/conftest.py index 1b2fffdc55f..7da77aa9fc5 100644 --- a/Tests/conftest.py +++ b/Tests/conftest.py @@ -11,17 +11,22 @@ def pytest_report_header(config): except Exception as e: return f"pytest_report_header failed: {e}" + 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 + # Ensure that the mark is defined + # even in cases where pytest-valgrind isn't installed - import pytest import warnings + import pytest + with warnings.catch_warnings(): warnings.simplefilter("error") try: getattr(pytest.mark, "valgrind_known_error") except: - config.addinivalue_line("markers", - "valgrind_known_error: Tests that have known issues with valgrind") + config.addinivalue_line( + "markers", + "valgrind_known_error: Tests that have known issues with valgrind", + )