# HG changeset patch # User Adrian Buehlmann # Date 1338380937 -7200 # Node ID a2e7456b162e4f8cef6d149387d8c0d46a00d820 # Parent b668ecd81629c207d44d79720a9be745be01ce72 run-tests: don't add python lines to expected dict For test input lines of *.t files starting with ' >>> ', the code block for ' >>> ' 609: if l.startswith(' >>> '): # python inlines 610: after.setdefault(pos, []).append(l) was (unsurprisingly) executed, but because there was an "if" instead of an "elif" on the condition "l.startswith(' ... ')", program execution proceeded to line 636 635: elif l.startswith(' '): # results 636: # queue up a list of expected results 637: expected.setdefault(pos, []).append(l[2:]) due to the fact that if l starts with ' >>> ' it also starts with ' '. The net effect was that python command lines in *.t files were (surprisingly) also added to the "expected" dict. This caused no externally observable bad behavior, as the "expected" dict was not consulted for these lines. [ original upstream message ] diff -r b668ecd81629 -r a2e7456b162e tests/run-tests.py --- a/tests/run-tests.py Sun Jun 03 19:35:23 2012 +0200 +++ b/tests/run-tests.py Wed May 30 14:28:57 2012 +0200 @@ -617,7 +617,7 @@ script.append('%s -m heredoctest <