6 from testmodel
import TestModel
10 class GitCommandTest(unittest
.TestCase
):
11 def testGitVersion(self
):
12 version
= git
.version()
13 self
.failUnless( version
.startswith('git version') )
16 tags
= git
.tag().splitlines()
17 self
.failUnless( 'ugit-0.0' in tags
)
19 def testGitShowCdUp(self
):
20 os
.chdir(testutils
.TEST_SCRIPT_DIR
)
21 cdup
= git
.rev_parse(show_cdup
=True)
22 self
.failUnless( cdup
== '../' )
24 def testGitShow(self
):
25 id = '1b9742bda5d26a4f250fa64657f66ed20624a084'
26 contents
= git
.show(id).splitlines()
27 self
.failUnless( contents
[0] == '/build' )
30 if __name__
== '__main__':