version: use the current branch when determining the automatic version
[git-cola.git] / test / test_git.py
blob8eac60ad5001ae2c31f045adfa7f4a5498a74b36
1 #!/usr/bin/env python
2 import os
3 import unittest
5 from cola import git
7 class GitCommandTest(unittest.TestCase):
8 def setUp(self):
9 self.git = git.Git()
11 def testGitVersion(self):
12 version = self.git.version()
13 self.failUnless(version.startswith('git version'))
15 def testGitTag(self):
16 tags = self.git.tag().splitlines()
17 self.failUnless( 'v1.0.0' in tags )
19 def testGitShow(self):
20 id = '1b9742bda5d26a4f250fa64657f66ed20624a084'
21 contents = self.git.show(id).splitlines()
22 self.failUnless(contents[0] == '/build')
24 if __name__ == '__main__':
25 unittest.main()