diff --git a/src/_pytest/warnings.py b/src/_pytest/warnings.py index 0604aa60b18..4478d8723c6 100644 --- a/src/_pytest/warnings.py +++ b/src/_pytest/warnings.py @@ -104,8 +104,6 @@ def catch_warnings_for_item( warnings.filterwarnings("always", category=DeprecationWarning) warnings.filterwarnings("always", category=PendingDeprecationWarning) - warnings.filterwarnings("error", category=pytest.PytestDeprecationWarning) - # Filters should have this precedence: mark, cmdline options, ini. # Filters should be applied in the inverse order of precedence. for arg in inifilters: diff --git a/testing/test_warnings.py b/testing/test_warnings.py index 685e1365df3..550ebb4b8e7 100644 --- a/testing/test_warnings.py +++ b/testing/test_warnings.py @@ -513,6 +513,9 @@ def test_hidden_by_system(self, testdir, monkeypatch): @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): """This ensures that PytestDeprecationWarnings raised by pytest are turned into errors.