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

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

Issue 2538373003: [Culprit-Finder] Merge lib/ to libs/. (Closed)
Patch Set: . 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 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 from common.pipeline_wrapper import pipeline_handlers 5 from common.pipeline_wrapper import pipeline_handlers
6 from crash.stacktrace import StackFrame 6 from crash.stacktrace import StackFrame
7 from crash.stacktrace import CallStack 7 from crash.stacktrace import CallStack
8 from crash.component_classifier import Component 8 from crash.component_classifier import Component
9 from crash.component_classifier import ComponentClassifier 9 from crash.component_classifier import ComponentClassifier
10 from crash.results import Result 10 from crash.results import Result
11 from crash.test.crash_testcase import CrashTestCase 11 from crash.test.crash_testcase import CrashTestCase
12 from model.crash.crash_config import CrashConfig 12 from model.crash.crash_config import CrashConfig
13 from lib.gitiles.change_log import ChangeLog 13 from libs.gitiles.change_log import ChangeLog
14 from lib.gitiles.change_log import FileChangeInfo 14 from libs.gitiles.change_log import FileChangeInfo
15 15
16 16
17 # N.B., the call to Get() in CrashConfigComponentClassifier.__init__ 17 # N.B., the call to Get() in CrashConfigComponentClassifier.__init__
18 # must only be executed from within the testFoo methods of 18 # must only be executed from within the testFoo methods of
19 # ComponentClassifierTest. That is, we can't just do this once and for all 19 # ComponentClassifierTest. That is, we can't just do this once and for all
20 # when doing ComponentClassifierTest.__init__, because that'll cause some 20 # when doing ComponentClassifierTest.__init__, because that'll cause some
21 # strange issues in mocking. But factoring it out like this so it gets 21 # strange issues in mocking. But factoring it out like this so it gets
22 # (re)called ever time a testFoo is run, that works. 22 # (re)called ever time a testFoo is run, that works.
23 class CrashConfigComponentClassifier(ComponentClassifier): 23 class CrashConfigComponentClassifier(ComponentClassifier):
24 """A ComponentClassifier which gets its components from CrashConfig.""" 24 """A ComponentClassifier which gets its components from CrashConfig."""
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 208 }
209 ], 209 ],
210 'message': 'blabla...', 210 'message': 'blabla...',
211 'commit_url': 211 'commit_url':
212 'https://chromium.googlesource.com/chromium/src/+/git_hash', 212 'https://chromium.googlesource.com/chromium/src/+/git_hash',
213 'code_review_url': 'https://codereview.chromium.org/2222', 213 'code_review_url': 'https://codereview.chromium.org/2222',
214 'reverted_revision': '8d4a4fa6s18raf3re12tg6r'}) 214 'reverted_revision': '8d4a4fa6s18raf3re12tg6r'})
215 self.assertEqual( 215 self.assertEqual(
216 CrashConfigComponentClassifier().ClassifyChangeLog(change_log), 216 CrashConfigComponentClassifier().ClassifyChangeLog(change_log),
217 []) 217 [])
OLDNEW
« 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