[Test] Modifiy regex for floats to avoid spurious matches like '3-4'

This commit is contained in:
Ray Speth 2015-01-22 00:04:05 +00:00
parent 598e47d644
commit 8d9f59a042

View file

@ -210,7 +210,7 @@ def compareTextFiles(env, file1, file2):
# Replace nearly-equal floating point numbers with exactly equivalent
# representations to avoid confusing difflib
reFloat = re.compile(r'(\s*)([+-]{0,1}\d+\.{0,1}\d*[eE]{0,1}[+-]{0,1}\d*)')
reFloat = re.compile(r'(\s*)([+-]{0,1}\d+\.{0,1}\d*([eE][+-]{0,1}\d*){0,1})')
for i in range(min(len(text1), len(text2))):
line1 = text1[i]
line2 = text2[i]