[Test] Modifiy regex for floats to avoid spurious matches like '3-4'
This commit is contained in:
parent
598e47d644
commit
8d9f59a042
1 changed files with 1 additions and 1 deletions
|
|
@ -210,7 +210,7 @@ def compareTextFiles(env, file1, file2):
|
||||||
|
|
||||||
# Replace nearly-equal floating point numbers with exactly equivalent
|
# Replace nearly-equal floating point numbers with exactly equivalent
|
||||||
# representations to avoid confusing difflib
|
# 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))):
|
for i in range(min(len(text1), len(text2))):
|
||||||
line1 = text1[i]
|
line1 = text1[i]
|
||||||
line2 = text2[i]
|
line2 = text2[i]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue