* implemented changes recommended by nicoddemus

This commit is contained in:
aostr 2016-07-05 15:22:27 +02:00
parent b4e0fabf93
commit 94e4a2dd67
3 changed files with 6 additions and 6 deletions

View File

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

View File

@ -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")

View File

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