Skip to content

Commit b6338ad

Browse files
committed
adapt test to test correct behaviour for python2
1 parent a1ebad7 commit b6338ad

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎jitlog/test/test_encoding.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,8 @@ def test_merge_point_extract_source_code(encoding,text,decoded,bom,tmpdir):
2929
file.write_binary(b''.join(l))
3030
trace.add_instr(MergePoint({0x1: str(file), 0x2: 2}))
3131
forest.extract_source_code_lines()
32-
assert forest.source_lines[str(file)][2] == (0, "print(\"" + decoded + "\")")
32+
line = forest.source_lines[str(file)][2]
33+
if PY3:
34+
assert line == (0, "print(\"" + decoded + "\")")
35+
else:
36+
assert line == (0, "print(\"" + text + "\")")

0 commit comments

Comments
 (0)