Skip to content

Commit

Permalink
PytestDeprecationWarning no longer a hard error
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Aug 17, 2020
1 parent 789589b commit 6315074
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/_pytest/warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions testing/test_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 6315074

Please sign in to comment.