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

Side by Side Diff: appengine/findit/crash/test/predator_testcase.py

Issue 2657913002: [Predator] Add ``Project`` class and ``ClassifySuspect`` method to project and component classifier (Closed)
Patch Set: Fix nits. 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 unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 import copy 5 import copy
6 import re 6 import re
7 7
8 import gae_ts_mon 8 import gae_ts_mon
9 from google.appengine.api import users 9 from google.appengine.api import users
10 10
(...skipping 23 matching lines...) Expand all
34 ], 34 ],
35 [ 35 [
36 'src/comp2.*', 36 'src/comp2.*',
37 'func2.*', 37 'func2.*',
38 'Comp2>Dummy' 38 'Comp2>Dummy'
39 ], 39 ],
40 ], 40 ],
41 'top_n': 4 41 'top_n': 4
42 }, 42 },
43 'project_classifier': { 43 'project_classifier': {
44 'file_path_marker_to_project_name': { 44 'project_path_function_hosts': [
45 'googleplex-android/': 'android_os', 45 ['android_os', ['googleplex-android/'], ['android.'], None],
46 }, 46 ['chromium', None, ['org.chromium'], ['src/']]
47 'function_marker_to_project_name': {
48 'org.chromium': 'chromium',
49 'android.': 'android_os',
50 },
51 'host_directories': [
52 'src/'
53 ], 47 ],
54 'non_chromium_project_rank_priority': { 48 'non_chromium_project_rank_priority': {
55 'android_os': '-1', 49 'android_os': '-1',
56 'others': '-2', 50 'others': '-2',
57 }, 51 },
58 'top_n': 4 52 'top_n': 4
59 } 53 }
60 } 54 }
61 55
62 DUMMY_CHANGELOG = ChangeLog.FromDict({ 56 DUMMY_CHANGELOG = ChangeLog.FromDict({
(...skipping 28 matching lines...) Expand all
91 class PredatorTestCase(TestCase): # pragma: no cover. 85 class PredatorTestCase(TestCase): # pragma: no cover.
92 86
93 def setUp(self): 87 def setUp(self):
94 super(PredatorTestCase, self).setUp() 88 super(PredatorTestCase, self).setUp()
95 CrashConfig.Get().Update( 89 CrashConfig.Get().Update(
96 users.User(email='admin@chromium.org'), True, **DEFAULT_CONFIG_DATA) 90 users.User(email='admin@chromium.org'), True, **DEFAULT_CONFIG_DATA)
97 gae_ts_mon.reset_for_unittest(disable=True) 91 gae_ts_mon.reset_for_unittest(disable=True)
98 92
99 def GetDummyChangeLog(self): 93 def GetDummyChangeLog(self):
100 return DUMMY_CHANGELOG 94 return DUMMY_CHANGELOG
OLDNEW
« no previous file with comments | « appengine/findit/crash/test/findit_for_chromecrash_test.py ('k') | appengine/findit/crash/test/project_classifier_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698