From aade0ddb67ac15716aee9e2ed27e6108a653f491 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Wed, 24 Apr 2013 21:47:13 +0000 Subject: [PATCH] [Test] Fixed an issue where text comparisons were incorrectly succeeding The logic for comparing string representations of floats in blessed output files was incorrect. This caused a number of tests that shouldn't have actually been passing to indicate success. This error was introduced in r1318. --- site_scons/buildutils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/site_scons/buildutils.py b/site_scons/buildutils.py index 5de95690e..dd4cab520 100644 --- a/site_scons/buildutils.py +++ b/site_scons/buildutils.py @@ -226,7 +226,8 @@ def compareTextFiles(env, file1, file2): # All the values are sufficiently close, so replace the string # so that the diff of this line will succeed - text2[i] = line1 + if allMatch: + text2[i] = line1 # Try the comparison again diff = list(difflib.unified_diff(text1, text2))