Skip to content

Commit 217e32a

Browse files
committed
tests: harden test_nonascii_text
1 parent c0e53a6 commit 217e32a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

testing/test_assertion.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,10 @@ def __repr__(self):
605605
return "\xff"
606606

607607
expl = callequal(A(), "1")
608-
assert expl
608+
if PY3:
609+
assert expl == ["ÿ == '1'", "+ 1"]
610+
else:
611+
assert expl == [u"\ufffd == '1'", u"+ 1"]
609612

610613
def test_format_nonascii_explanation(self):
611614
assert util.format_explanation("λ")

0 commit comments

Comments
 (0)