From bed3918cbc800682681a26c163f4cb0868b3a612 Mon Sep 17 00:00:00 2001 From: Thomas Hisch Date: Fri, 24 May 2019 09:11:03 +0200 Subject: [PATCH] Revert "logging: Simple impl of multline pretty printing" This reverts commit 31dfbb46686838e515d43188369c83cd3c397648. --- src/_pytest/logging.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/_pytest/logging.py b/src/_pytest/logging.py index 29524e7fb..660912c91 100644 --- a/src/_pytest/logging.py +++ b/src/_pytest/logging.py @@ -41,21 +41,6 @@ class ColoredLevelFormatter(logging.Formatter): if six.PY2: self._original_fmt = self._fmt else: - - class PercentStyleMultiline(logging.PercentStyle): - def format(self, record): - if "\n" in record.message: - fmt = self._fmt - dct = record.__dict__ - data_seq = [ - fmt % {**dct, "message": line} - for line in record.message.splitlines() - ] - return "\n".join(data_seq) - else: - return self._fmt % record.__dict__ - - self._style = PercentStyleMultiline(self._style._fmt) self._original_fmt = self._style._fmt self._level_to_fmt_mapping = {}