diff --git a/src/_pytest/terminal.py b/src/_pytest/terminal.py index fffdd836a..e8ac6ef6e 100644 --- a/src/_pytest/terminal.py +++ b/src/_pytest/terminal.py @@ -83,7 +83,7 @@ def pytest_addoption(parser): metavar="chars", help="show extra test summary info as specified by chars: (f)ailed, " "(E)rror, (s)kipped, (x)failed, (X)passed, " - "(p)assed, (P)assed with output, (a)ll except passed (p/P). " + "(p)assed, (P)assed with output, (a)ll except passed (p/P), or (A)ll. " "Warnings are displayed at all times except when " "--disable-warnings is set.", ) @@ -166,10 +166,13 @@ def getreportopt(config): reportchars = reportchars.replace("w", "") if reportchars: for char in reportchars: - if char not in reportopts and char != "a": - reportopts += char - elif char == "a": + if char == "a": reportopts = "sxXwEf" + elif char == "A": + reportopts = "sxXwEfpP" + break + elif char not in reportopts: + reportopts += char return reportopts diff --git a/testing/test_terminal.py b/testing/test_terminal.py index d0fdce23e..d730da666 100644 --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -838,6 +838,9 @@ def test_getreportopt(): config.option.disable_warnings = False assert getreportopt(config) == "sfxw" + config.option.reportchars = "A" + assert getreportopt(config) == "sxXwEfpP" + def test_terminalreporter_reportopt_addopts(testdir): testdir.makeini("[pytest]\naddopts=-rs")