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

Side by Side Diff: tests/git_number_test.py

Issue 184253003: Add git-reup and friends (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@freeze_thaw
Patch Set: fix pylint Created 6 years, 9 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 | « tests/git_freezer_test.py ('k') | tests/git_rebase_update_test.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Unit tests for git_number.py""" 6 """Unit tests for git_number.py"""
7 7
8 import binascii 8 import binascii
9 import os 9 import os
10 import sys 10 import sys
11 11
12 DEPOT_TOOLS_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 12 DEPOT_TOOLS_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
13 sys.path.insert(0, DEPOT_TOOLS_ROOT) 13 sys.path.insert(0, DEPOT_TOOLS_ROOT)
14 14
15 from testing_support import git_test_utils 15 from testing_support import git_test_utils
16 from testing_support import coverage_utils 16 from testing_support import coverage_utils
17 17
18 18
19 class Basic(git_test_utils.GitRepoReadWriteTestBase): 19 class Basic(git_test_utils.GitRepoReadWriteTestBase):
20 REPO = """ 20 REPO_SCHEMA = """
21 A B C D E 21 A B C D E
22 B F E 22 B F E
23 X Y E 23 X Y E
24 """ 24 """
25 25
26 @classmethod 26 @classmethod
27 def setUpClass(cls): 27 def setUpClass(cls):
28 super(Basic, cls).setUpClass() 28 super(Basic, cls).setUpClass()
29 import git_number 29 import git_number
30 cls.gn = git_number 30 cls.gn = git_number
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 self.assertEqual( 77 self.assertEqual(
78 None, 78 None,
79 self.repo.run(self.gn.get_num, binascii.unhexlify(self.repo['A']))) 79 self.repo.run(self.gn.get_num, binascii.unhexlify(self.repo['A'])))
80 80
81 81
82 if __name__ == '__main__': 82 if __name__ == '__main__':
83 sys.exit(coverage_utils.covered_main( 83 sys.exit(coverage_utils.covered_main(
84 os.path.join(DEPOT_TOOLS_ROOT, 'git_number.py'), 84 os.path.join(DEPOT_TOOLS_ROOT, 'git_number.py'),
85 '3.7' 85 '3.7'
86 )) 86 ))
OLDNEW
« no previous file with comments | « tests/git_freezer_test.py ('k') | tests/git_rebase_update_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698