bytes() is a builtin in python2.6+
This commit is contained in:
parent
d609b635f4
commit
3d0717813a
|
@ -546,9 +546,9 @@ class TestAssert_reprcompare(object):
|
||||||
# issue 429
|
# issue 429
|
||||||
left = "e"
|
left = "e"
|
||||||
right = "\xc3\xa9"
|
right = "\xc3\xa9"
|
||||||
if not isinstance(left, py.builtin.bytes):
|
if not isinstance(left, bytes):
|
||||||
left = py.builtin.bytes(left, "utf-8")
|
left = bytes(left, "utf-8")
|
||||||
right = py.builtin.bytes(right, "utf-8")
|
right = bytes(right, "utf-8")
|
||||||
expl = callequal(left, right)
|
expl = callequal(left, right)
|
||||||
for line in expl:
|
for line in expl:
|
||||||
assert isinstance(line, py.builtin.text)
|
assert isinstance(line, py.builtin.text)
|
||||||
|
|
Loading…
Reference in New Issue