From f599172addeba19d992086187c309df416887f00 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 5 Apr 2019 16:08:11 +0200 Subject: [PATCH] =?UTF-8?q?test=20with=20=F0=9F=98=84=20in=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- testing/test_skipping.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/testing/test_skipping.py b/testing/test_skipping.py index 4121f0c28..e167d4477 100644 --- a/testing/test_skipping.py +++ b/testing/test_skipping.py @@ -1255,3 +1255,11 @@ def test_line_with_reprcrash(monkeypatch): assert f(config, rep, 25) == "FAILED some::nodeid - ..." assert f(config, rep, 26) == "FAILED some::nodeid - some" assert f(config, rep, 80) == "FAILED some::nodeid - some" + + # Test unicode safety. + rep.longrepr.reprcrash.message = "😄😄😄😄😄\n2nd line" + assert f(config, rep, 26) == "FAILED some::nodeid - 😄..." + # XXX: this is actually wrong - since the character uses two terminal + # cells. + rep.longrepr.reprcrash.message = "😄😄😄😄\n2nd line" + assert f(config, rep, 26) == "FAILED some::nodeid - 😄😄😄😄"