* implemented changes recommended by nicoddemus
This commit is contained in:
parent
b4e0fabf93
commit
94e4a2dd67
|
@ -36,8 +36,8 @@
|
||||||
Thanks `@bagerard`_ for reporting (`#1503`_). Thanks to `@davehunt`_ and
|
Thanks `@bagerard`_ for reporting (`#1503`_). Thanks to `@davehunt`_ and
|
||||||
`@tomviner`_ for PR.
|
`@tomviner`_ for PR.
|
||||||
|
|
||||||
* Whitelisted pytest warnings to show up warnings summary by default. Added a new
|
* Now pytest warnings summary is shown up by default. Added a new flag
|
||||||
flag ``--disable-pytest-warnings`` to explicitly disable the warnings summary.
|
``--disable-pytest-warnings`` to explicitly disable the warnings summary.
|
||||||
This change resolves the (`#1668`_).
|
This change resolves the (`#1668`_).
|
||||||
|
|
||||||
* Renamed the pytest ``pdb`` module (plugin) into ``debugging``.
|
* Renamed the pytest ``pdb`` module (plugin) into ``debugging``.
|
||||||
|
|
|
@ -22,7 +22,7 @@ def pytest_addoption(parser):
|
||||||
group._addoption('-r',
|
group._addoption('-r',
|
||||||
action="store", dest="reportchars", default='', metavar="chars",
|
action="store", dest="reportchars", default='', metavar="chars",
|
||||||
help="show extra test summary info as specified by chars (f)ailed, "
|
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. "
|
"(p)passed, (P)passed with output, (a)all except pP. "
|
||||||
"The pytest warnings are displayed at all times except when "
|
"The pytest warnings are displayed at all times except when "
|
||||||
"--disable-pytest-warnings is set")
|
"--disable-pytest-warnings is set")
|
||||||
|
|
|
@ -517,11 +517,11 @@ class TestWarning:
|
||||||
def test_hello(fix):
|
def test_hello(fix):
|
||||||
pass
|
pass
|
||||||
""")
|
""")
|
||||||
result = testdir.runpytest()
|
result = testdir.runpytest("--disable-pytest-warnings")
|
||||||
assert result.parseoutcomes()["pytest-warnings"] > 0
|
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("""
|
result.stdout.fnmatch_lines("""
|
||||||
===*pytest-warning summary*===
|
===*pytest-warning summary*===
|
||||||
*WT1*test_warn_on_test_item*:5*hello*
|
*WT1*test_warn_on_test_item*:5*hello*
|
||||||
|
|
Loading…
Reference in New Issue