Skip to content

Commit b4b9f78

Browse files
committed
Support reportchars=A (really all, including passed)
1 parent a7e49e6 commit b4b9f78

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/_pytest/terminal.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def pytest_addoption(parser):
8383
metavar="chars",
8484
help="show extra test summary info as specified by chars: (f)ailed, "
8585
"(E)rror, (s)kipped, (x)failed, (X)passed, "
86-
"(p)assed, (P)assed with output, (a)ll except passed (p/P). "
86+
"(p)assed, (P)assed with output, (a)ll except passed (p/P), or (A)ll. "
8787
"Warnings are displayed at all times except when "
8888
"--disable-warnings is set.",
8989
)
@@ -166,10 +166,13 @@ def getreportopt(config):
166166
reportchars = reportchars.replace("w", "")
167167
if reportchars:
168168
for char in reportchars:
169-
if char not in reportopts and char != "a":
170-
reportopts += char
171-
elif char == "a":
169+
if char == "a":
172170
reportopts = "sxXwEf"
171+
elif char == "A":
172+
reportopts = "sxXwEfpP"
173+
break
174+
elif char not in reportopts:
175+
reportopts += char
173176
return reportopts
174177

175178

testing/test_terminal.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,9 @@ class Option(object):
838838
config.option.disable_warnings = False
839839
assert getreportopt(config) == "sfxw"
840840

841+
config.option.reportchars = "A"
842+
assert getreportopt(config) == "sxXwEfpP"
843+
841844

842845
def test_terminalreporter_reportopt_addopts(testdir):
843846
testdir.makeini("[pytest]\naddopts=-rs")

0 commit comments

Comments
 (0)