diff options
author | Ran Benita <ran@unusedvar.com> | 2020-12-12 22:09:00 +0200 |
---|---|---|
committer | Ran Benita <ran@unusedvar.com> | 2020-12-12 22:09:00 +0200 |
commit | 3302ff994959964c3ec2ab35ec1fe98c038684c0 (patch) | |
tree | 03f7c8f28dceb0558e3fac4a4e493f54cc72ec4e /src/_pytest/terminal.py | |
parent | 59bd0f6912fd9ec2b4c3e3bbc989636bb5f54dbf (diff) | |
download | pytest-3302ff994959964c3ec2ab35ec1fe98c038684c0.tar.gz |
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.
Diffstat (limited to 'src/_pytest/terminal.py')
-rw-r--r-- | src/_pytest/terminal.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/_pytest/terminal.py b/src/_pytest/terminal.py index 2e68e2575..0e0ed70e5 100644 --- a/src/_pytest/terminal.py +++ b/src/_pytest/terminal.py @@ -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() |