From c04767f9469c58984bcfd004c1e2995bc36bbc0d Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 7 May 2019 15:20:00 -0300 Subject: [PATCH] Use msg.rstrip() as suggested in review --- src/_pytest/terminal.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/_pytest/terminal.py b/src/_pytest/terminal.py index 5330d81cb..91526d00f 100644 --- a/src/_pytest/terminal.py +++ b/src/_pytest/terminal.py @@ -1000,8 +1000,7 @@ def _get_line_with_reprcrash_message(config, rep, termwidth): # u'😄' will result in a High Surrogate (U+D83D) character, which is # rendered as u'�'; in this case we just strip that character out as it # serves no purpose being rendered - while msg.endswith(u"\uD83D"): - msg = msg[:-1] + msg = msg.rstrip(u"\uD83D") msg += ellipsis line += sep + msg return line