tests: add git repo tests
[git-cola.git] / t / t0003-git-ops.py
blob4caa9f0fc841a31cf4819230a843261701edae2e
1 #!/usr/bin/env python
2 import os
3 import unittest
5 import testutils
6 from testutils import pipe
8 from ugit import git
10 class CommitTest(testutils.TestCase):
11 def testCommit(self):
12 self.shell("""
13 echo A > A
14 echo B > B
15 git init 2>&1 >/dev/null
16 git add A B
17 """)
18 git.commit(m="commit test")
19 log = pipe("git log --pretty=oneline | wc -l")
21 self.failUnless( '1' == log )
23 if __name__ == '__main__':
24 unittest.main()