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

Unified Diff: appengine/findit/crash/test/crash_test_suite.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/crash_test_suite.py
diff --git a/appengine/findit/crash/test/crash_test_suite.py b/appengine/findit/crash/test/crash_test_suite.py
index 9752350bca83254eb6e73dba568846fd363714ce..7c847e12798b624d88bcbb5d4a0aca1de8c1cfb4 100644
--- a/appengine/findit/crash/test/crash_test_suite.py
+++ b/appengine/findit/crash/test/crash_test_suite.py
@@ -24,30 +24,30 @@ class CrashTestSuite(StacktraceTestSuite): # pragma: no cover.
def _VerifyTwoChangeLogsEqual(self, changelog1, changelog2):
self.assertEqual(changelog1.ToDict(), changelog2.ToDict())
- def _VerifyTwoResultEqual(self, result1, result2):
- self._VerifyTwoChangeLogsEqual(result1.changelog, result2.changelog)
- self.assertEqual(result1.dep_path, result2.dep_path)
- self.assertEqual(result1.confidence, result2.confidence)
- self.assertEqual(result1.reasons, result2.reasons)
-
- self.assertEqual(result1.file_to_stack_infos.keys(),
- result2.file_to_stack_infos.keys())
- for file_path in result1.file_to_stack_infos.keys():
- self._VerifyTwoStackInfosEqual(result1.file_to_stack_infos[file_path],
- result2.file_to_stack_infos[file_path])
-
- self.assertEqual(result1.file_to_analysis_info,
- result2.file_to_analysis_info)
-
- def _VerifyTwoMatchResultEqual(self, match_result1, match_result2):
- self.assertEqual(match_result1.file_to_analysis_info,
- match_result2.file_to_analysis_info)
- self._VerifyTwoResultEqual(match_result1, match_result2)
-
- def _VerifyTwoMatchResultsEqual(self, match_results1, match_results2):
- self.assertEqual(match_results1._ignore_cls, match_results2._ignore_cls)
-
- self.assertEqual(len(match_results1), len(match_results2))
- for revision1, match_result1 in match_results1.iteritems():
- self.assertTrue(revision1 in match_results2)
- self._VerifyTwoMatchResultEqual(match_result1, match_results2[revision1])
+ def _VerifyTwoSuspectEqual(self, suspect1, suspect2):
+ """Assert that two ``Suspect`` objects are equal."""
+ self._VerifyTwoChangeLogsEqual(suspect1.changelog, suspect2.changelog)
+ self.assertEqual(suspect1.dep_path, suspect2.dep_path)
+ self.assertEqual(suspect1.confidence, suspect2.confidence)
+ self.assertEqual(suspect1.reasons, suspect2.reasons)
+
+ self.assertEqual(suspect1.file_to_analysis_info,
+ suspect2.file_to_analysis_info)
+
+ self.assertEqual(suspect1.file_to_stack_infos.keys(),
+ suspect2.file_to_stack_infos.keys())
+ for file_path in suspect1.file_to_stack_infos.keys():
+ self._VerifyTwoStackInfosEqual(suspect1.file_to_stack_infos[file_path],
+ suspect2.file_to_stack_infos[file_path])
+
+ self.assertEqual(suspect1.file_to_analysis_info,
+ suspect2.file_to_analysis_info)
+
+ def _VerifyTwoSuspectsEqual(self, suspects1, suspects2):
+ """Assert that two ``Suspects`` objects are equal."""
+ self.assertEqual(suspects1._ignore_cls, suspects2._ignore_cls)
+
+ self.assertEqual(len(suspects1), len(suspects2))
+ for revision1, suspect1 in suspects1.iteritems():
+ self.assertTrue(revision1 in suspects2)
+ self._VerifyTwoSuspectEqual(suspect1, suspects2[revision1])
« no previous file with comments | « appengine/findit/crash/test/crash_pipeline_test.py ('k') | appengine/findit/crash/test/findit_for_chromecrash_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698