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

Unified Diff: appengine/findit/crash/test/component_classifier_test.py

Issue 2562623004: Making CallStack immutable, so it can be hashable (Closed)
Patch Set: Addressing nits Created 4 years 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
Index: appengine/findit/crash/test/component_classifier_test.py
diff --git a/appengine/findit/crash/test/component_classifier_test.py b/appengine/findit/crash/test/component_classifier_test.py
index 8e765233de7be119710e5e9099db94df50e73ae5..8515dfc4f28470abd83b7cbffa13375d4c549b76 100644
--- a/appengine/findit/crash/test/component_classifier_test.py
+++ b/appengine/findit/crash/test/component_classifier_test.py
@@ -64,12 +64,10 @@ class ComponentClassifierTest(CrashTestCase):
self.assertEqual(self.cccc.GetClassFromResult(result), 'Comp1>Dummy')
def testClassifyCrashStack(self):
- crash_stack = CallStack(0)
- crash_stack.extend([
+ crash_stack = CallStack(0, frame_list=[
StackFrame(0, 'src/', 'func', 'comp1.cc', 'src/comp1.cc', [2]),
StackFrame(1, 'src/', 'ff', 'comp1.cc', 'src/comp1.cc', [21]),
- StackFrame(2, 'src/', 'func2', 'comp2.cc', 'src/comp2.cc', [8])
- ])
+ StackFrame(2, 'src/', 'func2', 'comp2.cc', 'src/comp2.cc', [8])])
self.assertEqual(self.cccc.Classify([], crash_stack),
['Comp1>Dummy', 'Comp2>Dummy'])
@@ -91,12 +89,10 @@ class ComponentClassifierTest(CrashTestCase):
# N.B., we must construct a new cccc here, becasue we changed CrashConfig.
self.cccc = CrashConfigComponentClassifier()
- crash_stack = CallStack(0)
- crash_stack.extend([
+ crash_stack = CallStack(0, frame_list=[
StackFrame(0, 'src/', 'func', 'comp1.cc', 'src/comp1.cc', [2]),
StackFrame(1, 'src/', 'ff', 'comp1.cc', 'src/comp1.cc', [21]),
- StackFrame(2, 'src/', 'func2', 'comp2.cc', 'src/comp2.cc', [8])
- ])
+ StackFrame(2, 'src/', 'func2', 'comp2.cc', 'src/comp2.cc', [8])])
result = Result(self.GetDummyChangeLog(), 'src/')
result.file_to_stack_infos = {
« no previous file with comments | « appengine/findit/crash/test/chromecrash_parser_test.py ('k') | appengine/findit/crash/test/occurrence_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698