aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/pytest/py3/_pytest/terminal.py
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-14 14:36:14 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-14 14:36:14 +0300
commite55fb55efda71cea0cd9c5fdafa41af406aef5bf (patch)
tree664dd8ed9a31584f9373593983273c9de2f13e7b /contrib/python/pytest/py3/_pytest/terminal.py
parent95e3624686fdca2887aa10594ee976cfddd32e38 (diff)
downloadydb-e55fb55efda71cea0cd9c5fdafa41af406aef5bf.tar.gz
intermediate changes
ref:8379e897e1f4fa0d71bb778a7c8bc68cb5e2f5ea
Diffstat (limited to 'contrib/python/pytest/py3/_pytest/terminal.py')
-rw-r--r--contrib/python/pytest/py3/_pytest/terminal.py26
1 files changed, 16 insertions, 10 deletions
diff --git a/contrib/python/pytest/py3/_pytest/terminal.py b/contrib/python/pytest/py3/_pytest/terminal.py
index ccbd84d7d7..b4848c48ab 100644
--- a/contrib/python/pytest/py3/_pytest/terminal.py
+++ b/contrib/python/pytest/py3/_pytest/terminal.py
@@ -542,15 +542,21 @@ class TerminalReporter:
if not running_xdist:
self.write_ensure_prefix(line, word, **markup)
if rep.skipped or hasattr(report, "wasxfail"):
- available_width = (
- (self._tw.fullwidth - self._tw.width_of_current_line)
- - len(" [100%]")
- - 1
- )
reason = _get_raw_skip_reason(rep)
- reason_ = _format_trimmed(" ({})", reason, available_width)
- if reason and reason_ is not None:
- self._tw.write(reason_)
+ if self.config.option.verbose < 2:
+ available_width = (
+ (self._tw.fullwidth - self._tw.width_of_current_line)
+ - len(" [100%]")
+ - 1
+ )
+ formatted_reason = _format_trimmed(
+ " ({})", reason, available_width
+ )
+ else:
+ formatted_reason = f" ({reason})"
+
+ if reason and formatted_reason is not None:
+ self._tw.write(formatted_reason)
if self._show_progress_info:
self._write_progress_information_filling_space()
else:
@@ -657,7 +663,7 @@ class TerminalReporter:
errors = len(self.stats.get("error", []))
skipped = len(self.stats.get("skipped", []))
deselected = len(self.stats.get("deselected", []))
- selected = self._numcollected - errors - skipped - deselected
+ selected = self._numcollected - deselected
line = "collected " if final else "collecting "
line += (
str(self._numcollected) + " item" + ("" if self._numcollected == 1 else "s")
@@ -668,7 +674,7 @@ class TerminalReporter:
line += " / %d deselected" % deselected
if skipped:
line += " / %d skipped" % skipped
- if self._numcollected > selected > 0:
+ if self._numcollected > selected:
line += " / %d selected" % selected
if self.isatty:
self.rewrite(line, bold=True, erase=True)