Merge pull request #5068 from blueyed/reportchars
Add support for reportchars=A (`-rA`)
This commit is contained in:
@@ -82,11 +82,11 @@ def pytest_addoption(parser):
|
||||
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, "
|
||||
"(p)passed, (P)passed with output, (a)all except pP. "
|
||||
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), or (A)ll. "
|
||||
"Warnings are displayed at all times except when "
|
||||
"--disable-warnings is set",
|
||||
"--disable-warnings is set.",
|
||||
)
|
||||
group._addoption(
|
||||
"--disable-warnings",
|
||||
@@ -167,10 +167,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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user