Fix/improve comparison of byte strings
Fixes https://github.com/pytest-dev/pytest/issues/5260.
This commit is contained in:
committed by
Bruno Oliveira
parent
64a6365227
commit
8c7eb82363
@@ -263,8 +263,11 @@ def _compare_eq_sequence(left, right, verbose=0):
|
||||
"At index {} diff: {!r} != {!r}".format(i, left[i], right[i])
|
||||
]
|
||||
break
|
||||
len_diff = len_left - len_right
|
||||
|
||||
if isinstance(left, bytes):
|
||||
return explanation
|
||||
|
||||
len_diff = len_left - len_right
|
||||
if len_diff:
|
||||
if len_diff > 0:
|
||||
dir_with_more = "Left"
|
||||
|
||||
Reference in New Issue
Block a user