PytestDeprecationWarning no longer a hard error

This commit is contained in:
Bruno Oliveira 2020-08-17 18:21:21 -03:00
parent 7605150eaa
commit 372a094005
2 changed files with 3 additions and 2 deletions

View File

@ -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:

View File

@ -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.