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

Side by Side Diff: appengine/findit/util_scripts/git_checkout/test/local_git_parsers_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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 from datetime import timedelta 6 from datetime import timedelta
7 import os 7 import os
8 import sys 8 import sys
9 import textwrap 9 import textwrap
10 import unittest 10 import unittest
11 11
12 _SCRIPT_DIR = os.path.join(os.path.dirname(__file__), 12 _SCRIPT_DIR = os.path.join(os.path.dirname(__file__),
13 os.path.pardir, os.path.pardir) 13 os.path.pardir, os.path.pardir)
14 sys.path.insert(1, _SCRIPT_DIR) 14 sys.path.insert(1, _SCRIPT_DIR)
15 import script_util 15 import script_util
16 script_util.SetUpSystemPaths() 16 script_util.SetUpSystemPaths()
17 17
18 from git_checkout import local_git_parsers 18 from git_checkout import local_git_parsers
19 from lib.gitiles import blame 19 from libs.gitiles import blame
20 from lib.gitiles import change_log 20 from libs.gitiles import change_log
21 21
22 22
23 class LocalGitParsersTest(unittest.TestCase): 23 class LocalGitParsersTest(unittest.TestCase):
24 24
25 def setUp(self): 25 def setUp(self):
26 super(LocalGitParsersTest, self).setUp() 26 super(LocalGitParsersTest, self).setUp()
27 self.blame_parser = local_git_parsers.GitBlameParser() 27 self.blame_parser = local_git_parsers.GitBlameParser()
28 28
29 def testGitBlameParser(self): 29 def testGitBlameParser(self):
30 output = textwrap.dedent( 30 output = textwrap.dedent(
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 output = '**Changelog start**\nblablabla' 237 output = '**Changelog start**\nblablabla'
238 self.assertEqual(local_git_parsers.GitChangeLogsParser()(output, 238 self.assertEqual(local_git_parsers.GitChangeLogsParser()(output,
239 'http://repo'), []) 239 'http://repo'), [])
240 240
241 def testGitDiffParser(self): 241 def testGitDiffParser(self):
242 self.assertEqual('output', local_git_parsers.GitDiffParser()('output')) 242 self.assertEqual('output', local_git_parsers.GitDiffParser()('output'))
243 243
244 244
245 if __name__ == '__main__': 245 if __name__ == '__main__':
246 unittest.main() 246 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698