terminal: when the skip/xfail is empty, don't show it as "()"

Avoid showing a line like

    x.py::test_4 XPASS ()   [100%]

which looks funny.
This commit is contained in:
Ran Benita
2020-12-12 22:09:00 +02:00
parent 59bd0f6912
commit 3302ff9949
2 changed files with 6 additions and 1 deletions

View File

@@ -554,7 +554,7 @@ class TerminalReporter:
)
reason = _get_raw_skip_reason(rep)
reason_ = _format_trimmed(" ({})", reason, available_width)
if reason_ is not None:
if reason and reason_ is not None:
self._tw.write(reason_)
if self._show_progress_info:
self._write_progress_information_filling_space()