| Index: tests/git_common_test.py
|
| diff --git a/tests/git_common_test.py b/tests/git_common_test.py
|
| index bba5b43ff8b163a2f4b725a82e8ad02631b219ce..b0ada6dfd092c673e336ba5453c83af203f5e63f 100755
|
| --- a/tests/git_common_test.py
|
| +++ b/tests/git_common_test.py
|
| @@ -207,6 +207,8 @@ class GitReadOnlyFunctionsTest(git_test_utils.GitRepoReadOnlyTestBase,
|
| self.repo.run(self.gc.hash_one, 'branch_D'),
|
| self.repo['D']
|
| )
|
| + self.assertTrue(self.repo['D'].startswith(
|
| + self.repo.run(self.gc.hash_one, 'branch_D', short=True)))
|
|
|
| def testStream(self):
|
| items = set(self.repo.commit_map.itervalues())
|
| @@ -366,6 +368,37 @@ class GitMutableFunctionsTest(git_test_utils.GitRepoReadWriteTestBase,
|
| self.assertEquals(self.repo.run(self.gc.upstream, 'happybranch'),
|
| 'master')
|
|
|
| + def testNormalizedVersion(self):
|
| + self.assertTrue(all(
|
| + isinstance(x, int) for x in self.repo.run(self.gc.normalized_version)))
|
| +
|
| + def testGetAllTrackingInfo(self):
|
| + self.repo.git('commit', '--allow-empty', '-am', 'foooooo')
|
| + self.repo.git('checkout', '-tb', 'happybranch', 'master')
|
| + self.repo.git('commit', '--allow-empty', '-am', 'foooooo')
|
| + self.repo.git('checkout', '-tb', 'child', 'happybranch')
|
| + expected = {
|
| + 'happybranch': {
|
| + 'hash': self.repo.run(self.gc.hash_one, 'happybranch', short=True),
|
| + 'upstream': 'master',
|
| + 'ahead': 'ahead 1',
|
| + 'behind': ''
|
| + },
|
| + 'child': {
|
| + 'hash': self.repo.run(self.gc.hash_one, 'child', short=True),
|
| + 'upstream': 'happybranch',
|
| + 'ahead': '',
|
| + 'behind': ''
|
| + },
|
| + 'master': {
|
| + 'hash': self.repo.run(self.gc.hash_one, 'master', short=True),
|
| + 'upstream': '',
|
| + 'ahead': '',
|
| + 'behind': ''
|
| + }
|
| + }
|
| + self.assertEquals(self.repo.run(self.gc.get_all_tracking_info), expected)
|
| +
|
|
|
| class GitMutableStructuredTest(git_test_utils.GitRepoReadWriteTestBase,
|
| GitCommonTestBase):
|
|
|