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

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

Issue 2613153006: [Predator] Add TouchCrashedFileMetaFeature. (Closed)
Patch Set: Add comments. 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
« no previous file with comments | « appengine/findit/crash/suspect.py ('k') | appengine/findit/libs/gitiles/commit_util.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 crash import crash_util 5 from crash import crash_util
6 from testing_utils import testing 6 from testing_utils import testing
7 7
8 8
9 class CrashUtilTest(testing.AppengineTestCase): 9 class CrashUtilTest(testing.AppengineTestCase):
10 10
11 def testIsSameFilePath(self): 11 def testIsSameFilePath(self):
12 path_1 = 'third_party/a/b/c/file.cc' 12 path_1 = 'third_party/a/b/c/file.cc'
13 path_2 = 'third_party/a/file.cc' 13 path_2 = 'third_party/a/file.cc'
14 14
15 self.assertTrue(crash_util.IsSameFilePath(path_1, path_2)) 15 self.assertTrue(crash_util.IsSameFilePath(path_1, path_2))
16 16
17 path_1 = 'a/b/c/file.cc' 17 path_1 = 'a/b/c/file.cc'
18 path_2 = 'a/b/c/file2.cc' 18 path_2 = 'a/b/c/file2.cc'
19 19
20 self.assertFalse(crash_util.IsSameFilePath(path_1, path_2)) 20 self.assertFalse(crash_util.IsSameFilePath(path_1, path_2))
21 21
22 path_1 = 'a/b/c/d/e/file.cc' 22 path_1 = 'a/b/c/d/e/file.cc'
23 path_2 = 'f/g/file.cc' 23 path_2 = 'f/g/file.cc'
24 24
25 self.assertTrue(crash_util.IsSameFilePath(None, None))
25 self.assertFalse(crash_util.IsSameFilePath(path_1, path_2)) 26 self.assertFalse(crash_util.IsSameFilePath(path_1, path_2))
27 self.assertFalse(crash_util.IsSameFilePath(None, path_2))
28 self.assertFalse(crash_util.IsSameFilePath(path_1, None))
OLDNEW
« no previous file with comments | « appengine/findit/crash/suspect.py ('k') | appengine/findit/libs/gitiles/commit_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698