bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] [PATCH 1/2] Replace variables before comparing expected files


From: Jookia
Subject: [Bug-wget] [PATCH 1/2] Replace variables before comparing expected files.
Date: Fri, 7 Aug 2015 07:51:16 +1000

* expected_files.py: Use formatted_content instead of file.content.
---
 testenv/conf/expected_files.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/testenv/conf/expected_files.py b/testenv/conf/expected_files.py
index 2c8d632..5362771 100644
--- a/testenv/conf/expected_files.py
+++ b/testenv/conf/expected_files.py
@@ -37,9 +37,10 @@ class ExpectedFiles:
         for file in self.expected_fs:
             if file.name in local_fs:
                 local_file = local_fs.pop(file.name)
-                if file.content != local_file['content']:
+                formatted_content = test_obj._replace_substring(file.content)
+                if formatted_content != local_file['content']:
                     for line in unified_diff(local_file['content'],
-                                             file.content,
+                                             formatted_content,
                                              fromfile='Actual',
                                              tofile='Expected'):
                         print(line, file=sys.stderr)
-- 
2.5.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]