git-cola: allow running cola from the source tree w/out having to chdir there
[git-cola.git] / test / test_git.py
blob8c1165e6b4695f16e1d6a48c4322b3c9afb31ffb
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(os.getcwd())
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()