#NEWLINE# def test_base( self ) : #NEWLINE# #INDENT# gdb = GitCmdObjectDB ( os . path . join ( self . rorepo . git_dir , 'objects' ) , self . rorepo . git ) #NEWLINE# hexsha = bin_to_hex ( gdb . partial_to_complete_sha_hex ( '0.1.6' ) ) #NEWLINE# assert ( len ( hexsha ) == 40 ) #NEWLINE# assert ( bin_to_hex ( gdb . partial_to_complete_sha_hex ( hexsha [ : 20 ] ) ) == hexsha ) #NEWLINE# for invalid_rev in ( '0000' , 'bad/ref' , 'super bad' ) : #NEWLINE# #INDENT# self . failUnlessRaises ( BadObject , gdb . partial_to_complete_sha_hex , self )