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

Side by Side Diff: tests/git_common_test.py

Issue 1195933003: Unskip testGetBranchesInfo(). (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Patch v2, without extra variable in the tests Created 5 years, 6 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 | « git_common.py ('k') | no next file » | 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_common.py""" 6 """Unit tests for git_common.py"""
7 7
8 import binascii 8 import binascii
9 import collections 9 import collections
10 import os 10 import os
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 self.assertEquals(self.repo.run(self.gc.upstream, 'bobly'), None) 384 self.assertEquals(self.repo.run(self.gc.upstream, 'bobly'), None)
385 self.assertEquals(self.repo.run(self.gc.upstream, 'master'), None) 385 self.assertEquals(self.repo.run(self.gc.upstream, 'master'), None)
386 self.repo.git('checkout', '-tb', 'happybranch', 'master') 386 self.repo.git('checkout', '-tb', 'happybranch', 'master')
387 self.assertEquals(self.repo.run(self.gc.upstream, 'happybranch'), 387 self.assertEquals(self.repo.run(self.gc.upstream, 'happybranch'),
388 'master') 388 'master')
389 389
390 def testNormalizedVersion(self): 390 def testNormalizedVersion(self):
391 self.assertTrue(all( 391 self.assertTrue(all(
392 isinstance(x, int) for x in self.repo.run(self.gc.get_git_version))) 392 isinstance(x, int) for x in self.repo.run(self.gc.get_git_version)))
393 393
394 @unittest.expectedFailure
395 def testGetBranchesInfo(self): 394 def testGetBranchesInfo(self):
396 self.repo.git('commit', '--allow-empty', '-am', 'foooooo') 395 self.repo.git('commit', '--allow-empty', '-am', 'foooooo')
397 self.repo.git('checkout', '-tb', 'happybranch', 'master') 396 self.repo.git('checkout', '-tb', 'happybranch', 'master')
398 self.repo.git('commit', '--allow-empty', '-am', 'foooooo') 397 self.repo.git('commit', '--allow-empty', '-am', 'foooooo')
399 self.repo.git('checkout', '-tb', 'child', 'happybranch') 398 self.repo.git('checkout', '-tb', 'child', 'happybranch')
400 399
401 self.repo.git('checkout', '-tb', 'to_delete', 'master') 400 self.repo.git('checkout', '-tb', 'to_delete', 'master')
402 self.repo.git('checkout', '-tb', 'parent_gone', 'to_delete') 401 self.repo.git('checkout', '-tb', 'parent_gone', 'to_delete')
403 self.repo.git('branch', '-D', 'to_delete') 402 self.repo.git('branch', '-D', 'to_delete')
404 403
(...skipping 18 matching lines...) Expand all
423 'master': ( 422 'master': (
424 self.repo.run(self.gc.hash_one, 'master', short=True), 423 self.repo.run(self.gc.hash_one, 'master', short=True),
425 '', 424 '',
426 None, 425 None,
427 None 426 None
428 ), 427 ),
429 '': None, 428 '': None,
430 'parent_gone': ( 429 'parent_gone': (
431 self.repo.run(self.gc.hash_one, 'parent_gone', short=True), 430 self.repo.run(self.gc.hash_one, 'parent_gone', short=True),
432 'to_delete', 431 'to_delete',
433 1 if supports_track else None, 432 None,
434 None 433 None
435 ), 434 ),
436 'to_delete': None 435 'to_delete': None
437 } 436 }
438 self.assertEquals(expected, actual) 437 self.assertEquals(expected, actual)
439 438
440 439
441 class GitMutableStructuredTest(git_test_utils.GitRepoReadWriteTestBase, 440 class GitMutableStructuredTest(git_test_utils.GitRepoReadWriteTestBase,
442 GitCommonTestBase): 441 GitCommonTestBase):
443 REPO_SCHEMA = """ 442 REPO_SCHEMA = """
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 self.assertIsNotNone(self.gc.thaw()) # One thaw should thaw everything 739 self.assertIsNotNone(self.gc.thaw()) # One thaw should thaw everything
741 740
742 self.assertEquals(self.repo.git('status', '--porcelain').stdout, STATUS_1) 741 self.assertEquals(self.repo.git('status', '--porcelain').stdout, STATUS_1)
743 742
744 self.repo.run(inner) 743 self.repo.run(inner)
745 744
746 745
747 if __name__ == '__main__': 746 if __name__ == '__main__':
748 sys.exit(coverage_utils.covered_main( 747 sys.exit(coverage_utils.covered_main(
749 os.path.join(DEPOT_TOOLS_ROOT, 'git_common.py'))) 748 os.path.join(DEPOT_TOOLS_ROOT, 'git_common.py')))
OLDNEW
« no previous file with comments | « git_common.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698