Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: test/message/testcfg.py

Issue 53089: Fixed test memory leaks (Closed)
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/flags.cc ('K') | « test/cctest/test-strings.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/message/testcfg.py
diff --git a/test/message/testcfg.py b/test/message/testcfg.py
index f259d3776adc7b64fff8526f7b17494e19e0cccd..ce7d0cac873c001fee75fa42fdb185f926236821 100644
--- a/test/message/testcfg.py
+++ b/test/message/testcfg.py
@@ -41,6 +41,10 @@ class MessageTestCase(test.TestCase):
self.config = config
self.mode = mode
Søren Thygesen Gjesse 2009/03/26 10:50:09 Please add a comment on why these lines are ignore
Christian Plesner Hansen 2009/03/27 00:24:26 Done
+ def IgnoreLine(self, str):
+ if not str: return True
+ else: return str.startswith('==') or str.startswith('**')
+
def IsFailureOutput(self, output):
f = file(self.expected)
# Skip initial '#' comment and spaces
@@ -58,7 +62,8 @@ class MessageTestCase(test.TestCase):
pattern = '^%s$' % pattern
patterns.append(pattern)
# Compare actual output with the expected
- outlines = [ s for s in output.stdout.split('\n') if s ]
+ raw_lines = output.stdout.split('\n')
+ outlines = [ s for s in raw_lines if not self.IgnoreLine(s) ]
if len(outlines) != len(patterns):
return True
for i in xrange(len(patterns)):
« src/flags.cc ('K') | « test/cctest/test-strings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698