Merge pull request #5268 from blueyed/harden-test

tests: harden test_nonascii_text
This commit is contained in:
Daniel Hahler 2019-05-24 01:51:35 +02:00 committed by GitHub
commit ec6d0fa4d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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("λ")