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

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

Issue 2588513002: [Predator] renamed "Result" to "Suspect" (Closed)
Patch Set: Removing redundant import 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 83d6bb3085fbff5b4f64fe569fadf58729bbcd19..d191560dc8804b50e4e172071c8d155afbe7cfda 100644
--- a/appengine/findit/crash/test/component_classifier_test.py
+++ b/appengine/findit/crash/test/component_classifier_test.py
@@ -7,7 +7,7 @@ from crash.stacktrace import StackFrame
from crash.stacktrace import CallStack
from crash.component_classifier import Component
from crash.component_classifier import ComponentClassifier
-from crash.results import Result
+from crash.suspect import Suspect
from crash.test.predator_testcase import PredatorTestCase
from model.crash.crash_config import CrashConfig
from libs.gitiles.change_log import ChangeLog
@@ -52,16 +52,16 @@ class ComponentClassifierTest(PredatorTestCase):
frame = StackFrame(0, 'src/', 'func2', 'a.cc', 'src/a.cc', [6])
self.assertEqual(self.cccc.GetClassFromStackFrame(frame), '')
- def testGetClassFromResult(self):
- result = Result(self.GetDummyChangeLog(), 'src/')
- self.assertEqual(self.cccc.GetClassFromResult(result), '')
+ def testGetClassFromSuspect(self):
+ suspect = Suspect(self.GetDummyChangeLog(), 'src/')
+ self.assertEqual(self.cccc.GetClassFromSuspect(suspect), '')
- result.file_to_stack_infos = {
+ suspect.file_to_stack_infos = {
'comp1.cc': [
(StackFrame(0, 'src/', 'func', 'comp1.cc', 'src/comp1.cc', [2]), 0)
]
}
- self.assertEqual(self.cccc.GetClassFromResult(result), 'Comp1>Dummy')
+ self.assertEqual(self.cccc.GetClassFromSuspect(suspect), 'Comp1>Dummy')
def testClassifyCrashStack(self):
crash_stack = CallStack(0, frame_list=[
@@ -72,15 +72,15 @@ class ComponentClassifierTest(PredatorTestCase):
self.assertEqual(self.cccc.Classify([], crash_stack),
['Comp1>Dummy', 'Comp2>Dummy'])
- def testClassifyResults(self):
- result = Result(self.GetDummyChangeLog(), 'src/')
- result.file_to_stack_infos = {
+ def testClassifySuspects(self):
+ suspect = Suspect(self.GetDummyChangeLog(), 'src/')
+ suspect.file_to_stack_infos = {
'comp1.cc': [
(StackFrame(0, 'src/', 'func', 'comp1.cc', 'src/comp1.cc', [2]), 0)
]
}
- self.assertEqual(self.cccc.Classify([result], CallStack(0)),
+ self.assertEqual(self.cccc.Classify([suspect], CallStack(0)),
['Comp1>Dummy'])
def testClassifierDoNotHaveConfig(self):
@@ -94,14 +94,14 @@ class ComponentClassifierTest(PredatorTestCase):
StackFrame(1, 'src/', 'ff', 'comp1.cc', 'src/comp1.cc', [21]),
StackFrame(2, 'src/', 'func2', 'comp2.cc', 'src/comp2.cc', [8])])
- result = Result(self.GetDummyChangeLog(), 'src/')
- result.file_to_stack_infos = {
+ suspect = Suspect(self.GetDummyChangeLog(), 'src/')
+ suspect.file_to_stack_infos = {
'comp1.cc': [
(StackFrame(0, 'src/', 'func', 'comp1.cc', 'src/comp1.cc', [2]), 0)
]
}
- self.assertEqual(self.cccc.Classify([result], crash_stack), [])
+ self.assertEqual(self.cccc.Classify([suspect], crash_stack), [])
def testGetClassFromFileChangeInfo(self):
self.assertEqual(
« no previous file with comments | « appengine/findit/crash/test/changelist_classifier_test.py ('k') | appengine/findit/crash/test/crash_pipeline_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698