mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Lint fixes
This commit is contained in:
parent
bd38487324
commit
d35995f945
|
@ -11,17 +11,22 @@ def pytest_report_header(config):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return f"pytest_report_header failed: {e}"
|
return f"pytest_report_header failed: {e}"
|
||||||
|
|
||||||
|
|
||||||
def pytest_configure(config):
|
def pytest_configure(config):
|
||||||
# We're marking some tests to ignore valgrind errors and XFAIL them.
|
# 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 warnings
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import warnings
|
|
||||||
|
|
||||||
with warnings.catch_warnings():
|
with warnings.catch_warnings():
|
||||||
warnings.simplefilter("error")
|
warnings.simplefilter("error")
|
||||||
try:
|
try:
|
||||||
getattr(pytest.mark, "valgrind_known_error")
|
getattr(pytest.mark, "valgrind_known_error")
|
||||||
except:
|
except:
|
||||||
config.addinivalue_line("markers",
|
config.addinivalue_line(
|
||||||
"valgrind_known_error: Tests that have known issues with valgrind")
|
"markers",
|
||||||
|
"valgrind_known_error: Tests that have known issues with valgrind",
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user