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

Side by Side Diff: appengine/findit/waterfall/test/build_failure_analysis_test.py

Issue 2344443005: [Findit] Factoring the gitiles (etc) stuff out into its own directory (Closed)
Patch Set: rebase-update Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from datetime import datetime 5 from datetime import datetime
6 6
7 from common.blame import Blame 7 from gitiles.blame import Blame, Region
8 from common.blame import Region 8 from gitiles.change_log import FileChangeInfo
9 from common.change_log import FileChangeInfo 9 from gitiles.diff import ChangeType
10 from common.diff import ChangeType 10 from gitiles.git_repository import GitRepository
11 from common.git_repository import GitRepository
12 from waterfall import build_failure_analysis 11 from waterfall import build_failure_analysis
13 from waterfall.failure_signal import FailureSignal 12 from waterfall.failure_signal import FailureSignal
14 from waterfall.test import wf_testcase 13 from waterfall.test import wf_testcase
15 14
16 15
17 class BuildFailureAnalysisTest(wf_testcase.WaterfallTestCase): 16 class BuildFailureAnalysisTest(wf_testcase.WaterfallTestCase):
18 17
19 def _MockGetChangeLog(self, revision): 18 def _MockGetChangeLog(self, revision):
20 19
21 class MockChangeLog(object): 20 class MockChangeLog(object):
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 touched_file, file_path_in_log, justification, file_name_occurrences, 1140 touched_file, file_path_in_log, justification, file_name_occurrences,
1142 line_numbers, repo_info, commit_revision) 1141 line_numbers, repo_info, commit_revision)
1143 1142
1144 expected_justification = { 1143 expected_justification = {
1145 'score': 4, 1144 'score': 4,
1146 'hints': { 1145 'hints': {
1147 'modified c.cc[1, 3] (and it was in log)': 4 1146 'modified c.cc[1, 3] (and it was in log)': 4
1148 } 1147 }
1149 } 1148 }
1150 self.assertEqual(expected_justification, justification.ToDict()) 1149 self.assertEqual(expected_justification, justification.ToDict())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698