From ff428bfee1795508cc0515a43b2a1afd1fa0a739 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 15 May 2019 12:48:40 +0200 Subject: [PATCH] tests: harden test_nonascii_text --- testing/test_assertion.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testing/test_assertion.py b/testing/test_assertion.py index 8a59b7e8d..e1aff3805 100644 --- a/testing/test_assertion.py +++ b/testing/test_assertion.py @@ -605,7 +605,10 @@ class TestAssert_reprcompare(object): return "\xff" expl = callequal(A(), "1") - assert expl + if PY3: + assert expl == ["ÿ == '1'", "+ 1"] + else: + assert expl == [u"\ufffd == '1'", u"+ 1"] def test_format_nonascii_explanation(self): assert util.format_explanation("λ")