diff --git a/CHANGELOG.rst b/CHANGELOG.rst index eeb6ca66c..b3eb6e7e1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -36,8 +36,8 @@ Thanks `@bagerard`_ for reporting (`#1503`_). Thanks to `@davehunt`_ and `@tomviner`_ for PR. -* Whitelisted pytest warnings to show up warnings summary by default. Added a new - flag ``--disable-pytest-warnings`` to explicitly disable the warnings summary. +* Now pytest warnings summary is shown up by default. Added a new flag + ``--disable-pytest-warnings`` to explicitly disable the warnings summary. This change resolves the (`#1668`_). * Renamed the pytest ``pdb`` module (plugin) into ``debugging``. diff --git a/_pytest/terminal.py b/_pytest/terminal.py index 0eb3696c4..ed58c4d2f 100644 --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -22,7 +22,7 @@ def pytest_addoption(parser): group._addoption('-r', action="store", dest="reportchars", default='', metavar="chars", help="show extra test summary info as specified by chars (f)ailed, " - "(E)error, (s)skipped, (x)failed, (X)passed (w)pytest-warnings " + "(E)error, (s)skipped, (x)failed, (X)passed, " "(p)passed, (P)passed with output, (a)all except pP. " "The pytest warnings are displayed at all times except when " "--disable-pytest-warnings is set") diff --git a/testing/test_config.py b/testing/test_config.py index c90555756..f6511b8d4 100644 --- a/testing/test_config.py +++ b/testing/test_config.py @@ -517,11 +517,11 @@ class TestWarning: def test_hello(fix): pass """) - result = testdir.runpytest() + result = testdir.runpytest("--disable-pytest-warnings") assert result.parseoutcomes()["pytest-warnings"] > 0 - assert "hello" in result.stdout.str() + assert "hello" not in result.stdout.str() - result = testdir.runpytest("-rw") + result = testdir.runpytest() result.stdout.fnmatch_lines(""" ===*pytest-warning summary*=== *WT1*test_warn_on_test_item*:5*hello*