mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +03:00
Fix pytest valgrind warnings
This commit is contained in:
parent
f15f573e51
commit
22a6893364
|
@ -19,13 +19,11 @@ 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
|
# Ensure that the mark is defined
|
||||||
# even in cases where pytest-valgrind isn't installed
|
# even in cases where pytest-valgrind isn't installed
|
||||||
|
try:
|
||||||
with warnings.catch_warnings():
|
config.addinivalue_line(
|
||||||
warnings.simplefilter("error")
|
"markers",
|
||||||
try:
|
"valgrind_known_error: Tests that have known issues with valgrind",
|
||||||
getattr(pytest.mark, "valgrind_known_error")
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
config.addinivalue_line(
|
# valgrind is already installed
|
||||||
"markers",
|
pass
|
||||||
"valgrind_known_error: Tests that have known issues with valgrind",
|
|
||||||
)
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user