Skip to content

Commit 58f77d8

Browse files
committed
Make decode('utf-8') match cmark
1 parent 3b53a8d commit 58f77d8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

test/cmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class cmark_mem(Structure):
1414
def pipe_through_prog(prog, text):
1515
p1 = Popen(prog.split(), stdout=PIPE, stdin=PIPE, stderr=PIPE)
1616
[result, err] = p1.communicate(input=text.encode('utf-8'))
17-
return [p1.returncode, result, err]
17+
return [p1.returncode, result.decode('utf-8'), err]
1818

1919
def to_html(lib, text):
2020
get_alloc = lib.cmark_get_default_mem_allocator

test/spec_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def do_test(converter, test, normalize, prev_result):
5555
expected_html = test['html']
5656

5757
try:
58-
actual_html = actual_html_bytes.decode('utf-8')
58+
actual_html = actual_html_bytes
5959
except UnicodeDecodeError as e:
6060
if prev_result != 'fail':
6161
print_test_header(test)

0 commit comments

Comments
 (0)