PytestDeprecationWarning no longer a hard error
This commit is contained in:
parent
7605150eaa
commit
372a094005
|
@ -104,8 +104,6 @@ def catch_warnings_for_item(
|
||||||
warnings.filterwarnings("always", category=DeprecationWarning)
|
warnings.filterwarnings("always", category=DeprecationWarning)
|
||||||
warnings.filterwarnings("always", category=PendingDeprecationWarning)
|
warnings.filterwarnings("always", category=PendingDeprecationWarning)
|
||||||
|
|
||||||
warnings.filterwarnings("error", category=pytest.PytestDeprecationWarning)
|
|
||||||
|
|
||||||
# Filters should have this precedence: mark, cmdline options, ini.
|
# Filters should have this precedence: mark, cmdline options, ini.
|
||||||
# Filters should be applied in the inverse order of precedence.
|
# Filters should be applied in the inverse order of precedence.
|
||||||
for arg in inifilters:
|
for arg in inifilters:
|
||||||
|
|
|
@ -513,6 +513,9 @@ class TestDeprecationWarningsByDefault:
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("change_default", [None, "ini", "cmdline"])
|
@pytest.mark.parametrize("change_default", [None, "ini", "cmdline"])
|
||||||
|
@pytest.mark.skip(
|
||||||
|
reason="This test should be enabled again before pytest 7.0 is released"
|
||||||
|
)
|
||||||
def test_deprecation_warning_as_error(testdir, change_default):
|
def test_deprecation_warning_as_error(testdir, change_default):
|
||||||
"""This ensures that PytestDeprecationWarnings raised by pytest are turned into errors.
|
"""This ensures that PytestDeprecationWarnings raised by pytest are turned into errors.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue