hoefling set me in the right direction. By setting short str, you can customize what's output instead of dots; forwarding the rest of the elements of the tuple while leaving this at an empty string should suffice. I even did some... see for yourself. Using --verbose is not recommended. Could remove more parts, ones that deal with failure cases, but didn't care about that now.
A nice picture of the output. (no rep yet to post it here)
from _pytest.reports import CollectReport, TestReport, Config
from typing import Tuple, Union, Mapping
import py
def pytest_report_teststatus(report: Union[CollectReport, TestReport], config: Config, files_set=set()) \
-> Tuple[str, str, Union[str, Mapping[str, bool]]]:
def get_line_delim():
n = py.io.TerminalWriter().fullwidth // 3
return f'\n{"* "*n}\n'
category, short, verbose = '', '', ''
if hasattr(report, 'wasxfail'):
if report.skipped:
category = 'xfailed'
verbose = 'xfail'
elif report.passed:
category = 'xpassed'
verbose = ('XPASS', {'yellow': True})
return (category, short, verbose)
elif report.when in ('setup', 'teardown'):
if report.failed:
category = 'error'
verbose = 'ERROR'
elif report.skipped:
category = 'skipped'
verbose = 'SKIPPED'
elif report.when == 'setup' and report.location[0] not in files_set:
files_set.add(report.location[0]) # needed so that the first test for each file can start out clean
return (category, get_line_delim(), (verbose, {'red': True}))
return (category, short, verbose)
category = report.outcome
verbose = category.upper()
return (category, get_line_delim(), (verbose, {'red': True}))