Fix an unfortunate mis-conversion: sometimes "print x," must be
converted to "print(x, end=' ')", but other times it must be converted to "print(x, end='')". There's no easy way to find out, because it depends on whether x ends with a newline. I'm sure I'll find more like this.
This commit is contained in:
parent
fff80dfa4a
commit
08c47ba0df
@ -738,19 +738,19 @@ def reportdiff(expected, output):
|
|||||||
elif op == 'delete':
|
elif op == 'delete':
|
||||||
print("***", pair(a0, a1), "of expected output missing:")
|
print("***", pair(a0, a1), "of expected output missing:")
|
||||||
for line in a[a0:a1]:
|
for line in a[a0:a1]:
|
||||||
print("-", line, end=' ')
|
print("-", line, end='')
|
||||||
|
|
||||||
elif op == 'replace':
|
elif op == 'replace':
|
||||||
print("*** mismatch between", pair(a0, a1), "of expected", \
|
print("*** mismatch between", pair(a0, a1), "of expected", \
|
||||||
"output and", pair(b0, b1), "of actual output:")
|
"output and", pair(b0, b1), "of actual output:")
|
||||||
for line in difflib.ndiff(a[a0:a1], b[b0:b1]):
|
for line in difflib.ndiff(a[a0:a1], b[b0:b1]):
|
||||||
print(line, end=' ')
|
print(line, end='')
|
||||||
|
|
||||||
elif op == 'insert':
|
elif op == 'insert':
|
||||||
print("***", pair(b0, b1), "of actual output doesn't appear", \
|
print("***", pair(b0, b1), "of actual output doesn't appear", \
|
||||||
"in expected output after line", str(a1)+":")
|
"in expected output after line", str(a1)+":")
|
||||||
for line in b[b0:b1]:
|
for line in b[b0:b1]:
|
||||||
print("+", line, end=' ')
|
print("+", line, end='')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("get_opcodes() returned bad tuple?!?!", (op, a0, a1, b0, b1))
|
print("get_opcodes() returned bad tuple?!?!", (op, a0, a1, b0, b1))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user