Commit 9e7c1930 authored by Denis Laxalde's avatar Denis Laxalde
Browse files

[py3] Decode stream before doing string comparisons

parent 33ad61a9f699
......@@ -133,8 +133,9 @@ def lcsv_check(cnx, store, fname, scheme_uri, separator=';', **kwargs):
# also check there are the expected number of separator for each line
expected_separators = stream.readline().count(separator)
expected_separators = stream.readline().decode('utf-8').count(separator)
for i, line in enumerate(stream):
line = line.decode('utf-8')
if line.count(separator) != expected_separators:
linenum = i + 2
raise AssertionError('Got %s %s on line %s of %s, %s where expected'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment