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

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

Issue 2449853012: [Predator] Fix bug in min_distance after refactor and add back skip added/deleted deps. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
(Empty)
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
3 # found in the LICENSE file.
4
5 from crash.culprit import Culprit
6 from crash.test.crash_testcase import CrashTestCase
7
8
9 class CulpritTest(CrashTestCase):
10
11 def testFieldsProperty(self):
12 culprit = Culprit('', ['Blink>DOM'], [], None, 'core_algorithm')
13 self.assertEqual(culprit.fields, ('project', 'components', 'cls',
14 'regression_range', 'algorithm'))
15 def testToDictsDroppingEmptyFields(self):
16 culprit = Culprit('', [], [], [], 'core_algorithm')
17 self.assertTupleEqual(culprit.ToDicts(),
18 ({'found': False},
19 {'found_suspects': False,
20 'found_project': False,
21 'found_components': False,
22 'has_regression_range': False,
23 'solution': 'core_algorithm'}))
24
25 def testToDicts(self):
26 cl = self.GetDummyChangeLog()
27 culprit = Culprit('proj', ['comp'], [cl], ['50.0.1234.1', '50.0.1234.2'],
28 'core_algorithm')
29 self.assertTupleEqual(culprit.ToDicts(),
30 ({'found': True,
31 'regression_range': ['50.0.1234.1', '50.0.1234.2'],
32 'suspected_project': 'proj',
33 'suspected_components': ['comp'],
34 'suspected_cls': [cl.ToDict()]},
35 {'found_suspects': True,
36 'found_project': True,
37 'found_components': True,
38 'has_regression_range': True,
39 'solution': 'core_algorithm'}))
OLDNEW
« no previous file with comments | « appengine/findit/crash/test/changelist_classifier_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