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: tools/cygprofile/patch_orderfile_unittest.py

Issue 859303005: Only include unique lines when patching orderfile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« tools/cygprofile/patch_orderfile.py ('K') | « tools/cygprofile/patch_orderfile.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/cygprofile/patch_orderfile_unittest.py
diff --git a/tools/cygprofile/patch_orderfile_unittest.py b/tools/cygprofile/patch_orderfile_unittest.py
index b88dcafc38380069b47f44881500003a10dddb9b..8ee2df5c0060208254c867632b87003df4139a82 100755
--- a/tools/cygprofile/patch_orderfile_unittest.py
+++ b/tools/cygprofile/patch_orderfile_unittest.py
@@ -101,9 +101,9 @@ class TestPatchOrderFile(unittest.TestCase):
def testPrintSymbolWithPrefixes(self):
class FakeOutputFile(object):
def __init__(self):
- self.output = []
+ self.output = ''
def write(self, s):
- self.output.append(s)
+ self.output = self.output + s
pasko 2015/01/22 17:37:14 did the old version not work? if so, why?
azarchs 2015/01/22 17:44:30 The old one resulted in extra '\n's between output
test_symbol = "dummySymbol"
symbol_names = [test_symbol]
fake_output = FakeOutputFile()
@@ -113,7 +113,7 @@ class TestPatchOrderFile(unittest.TestCase):
.text.unlikely.dummySymbol
.text.dummySymbol
"""
- self.assertEquals("\n".join(fake_output.output), expected_output)
+ self.assertEquals(fake_output.output, expected_output)
if __name__ == "__main__":
« tools/cygprofile/patch_orderfile.py ('K') | « tools/cygprofile/patch_orderfile.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698