From b4b9f788af45906cec62620db4a9522bf0b3d02f Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 7 Apr 2019 18:03:06 +0200 Subject: [PATCH] Support reportchars=A (really all, including passed) --- src/_pytest/terminal.py | 11 +++++++---- testing/test_terminal.py | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) 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")