py.builtins._totext -> string literals or six.text_type
This commit is contained in:
@@ -509,12 +509,12 @@ class TestAssert_reprcompare(object):
|
||||
assert "raised in repr()" not in expl
|
||||
|
||||
def test_unicode(self):
|
||||
left = py.builtin._totext("£€", "utf-8")
|
||||
right = py.builtin._totext("£", "utf-8")
|
||||
left = u"£€"
|
||||
right = u"£"
|
||||
expl = callequal(left, right)
|
||||
assert expl[0] == py.builtin._totext("'£€' == '£'", "utf-8")
|
||||
assert expl[1] == py.builtin._totext("- £€", "utf-8")
|
||||
assert expl[2] == py.builtin._totext("+ £", "utf-8")
|
||||
assert expl[0] == u"'£€' == '£'"
|
||||
assert expl[1] == u"- £€"
|
||||
assert expl[2] == u"+ £"
|
||||
|
||||
def test_nonascii_text(self):
|
||||
"""
|
||||
@@ -542,7 +542,7 @@ class TestAssert_reprcompare(object):
|
||||
expl = callequal(left, right)
|
||||
for line in expl:
|
||||
assert isinstance(line, py.builtin.text)
|
||||
msg = py.builtin._totext("\n").join(expl)
|
||||
msg = u"\n".join(expl)
|
||||
assert msg
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user