repo.or.cz
/
git-cola.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
tests: add git repo tests
[git-cola.git]
/
t
/
t0003-git-ops.py
blob
4caa9f0fc841a31cf4819230a843261701edae2e
1
#!/usr/bin/env python
2
import
os
3
import
unittest
4
5
import
testutils
6
from
testutils
import
pipe
7
8
from
ugit
import
git
9
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"
)
20
21
self
.
failUnless
(
'1'
==
log
)
22
23
if
__name__
==
'__main__'
:
24
unittest
.
main
()