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

Unified Diff: appengine/findit/crash/scorers/test/aggregators_test.py

Issue 2707603002: [Predator] Generate all changelogs in regression ranges instead of only matched changelogs (Closed)
Patch Set: . Created 3 years, 10 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
Index: appengine/findit/crash/scorers/test/aggregators_test.py
diff --git a/appengine/findit/crash/scorers/test/aggregators_test.py b/appengine/findit/crash/scorers/test/aggregators_test.py
deleted file mode 100644
index b1ff3cfdfed6ba2fa13dc48fa8eae7a9491f8156..0000000000000000000000000000000000000000
--- a/appengine/findit/crash/scorers/test/aggregators_test.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from crash.stacktrace import StackFrame
-from crash.suspect import Suspect
-from crash.scorers import aggregators
-from crash.scorers.min_distance import MinDistance
-from crash.scorers.test.scorer_test_suite import ScorerTestSuite
-from crash.scorers.top_frame_index import TopFrameIndex
-
-
-class AggregatorsTest(ScorerTestSuite):
-
- def testMultiplier(self):
- aggregator = aggregators.Multiplier()
- self.assertEqual(aggregator.Aggregate([1, 0.5, 0.2]), 0.1)
- self.assertEqual(aggregator([None, None]), None)
- self.assertEqual(aggregator([1, 0.5, 0.2]), 0.1)
-
- def testIdentityAggregator(self):
- aggregator = aggregators.IdentityAggregator()
- self.assertEqual(aggregator.Aggregate([1, 0.5, 0.2]), [1, 0.5, 0.2])
- self.assertEqual(aggregator([1, 0.5, 0.2]), [1, 0.5, 0.2])
-
- def testChangedFilesAggregator(self):
- aggregator = aggregators.ChangedFilesAggregator()
- file_info_list = [
- [
- {'file': 'f1.cc', 'blame_url': 'https://repo_url',
- 'info': 'scorer 1'},
- {'file': 'f2.cc', 'blame_url': 'https://repo_url',
- 'info': 'scorer 1'},
- ],
- [
- {'file': 'f1.cc', 'blame_url': 'https://repo_url',
- 'info': None},
- {'file': 'f2.cc', 'blame_url': 'https://repo_url',
- 'info': 'scorer 2'},
- ],
- ]
- self.assertEqual(aggregator(file_info_list),
- [{'file': 'f1.cc', 'blame_url': 'https://repo_url',
- 'info': 'scorer 1'},
- {'file': 'f2.cc', 'blame_url': 'https://repo_url',
- 'info': 'scorer 1\nscorer 2'}])
-
-

Powered by Google App Engine
This is Rietveld 408576698