Skip to content

Commit 372a094

Browse files
committed
PytestDeprecationWarning no longer a hard error
1 parent 7605150 commit 372a094

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/_pytest/warnings.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ def catch_warnings_for_item(
104104
warnings.filterwarnings("always", category=DeprecationWarning)
105105
warnings.filterwarnings("always", category=PendingDeprecationWarning)
106106

107-
warnings.filterwarnings("error", category=pytest.PytestDeprecationWarning)
108-
109107
# Filters should have this precedence: mark, cmdline options, ini.
110108
# Filters should be applied in the inverse order of precedence.
111109
for arg in inifilters:

testing/test_warnings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,9 @@ def test_hidden_by_system(self, testdir, monkeypatch):
513513

514514

515515
@pytest.mark.parametrize("change_default", [None, "ini", "cmdline"])
516+
@pytest.mark.skip(
517+
reason="This test should be enabled again before pytest 7.0 is released"
518+
)
516519
def test_deprecation_warning_as_error(testdir, change_default):
517520
"""This ensures that PytestDeprecationWarnings raised by pytest are turned into errors.
518521

0 commit comments

Comments
 (0)