def test_module_version(self): module = one( Git.iter('ls-tree', 'HEAD', 'cinnabar', cwd=os.path.join(os.path.dirname(__file__), '..'))) self.assertEqual(CmdVersion.module_version(), split_ls_tree(module)[2])
def test_helper_version(self): helper = one( Git.iter('ls-tree', 'HEAD', 'helper', cwd=os.path.join(os.path.dirname(__file__), '..'))) self.assertEqual(CmdVersion.helper_version()[1], split_ls_tree(helper)[2])
def old_helper_hash(head): from cinnabar.git import Git, split_ls_tree from cinnabar.util import one return split_ls_tree( one( Git.iter('ls-tree', head, 'helper', cwd=os.path.join(os.path.dirname(__file__), '..'))))[2]
def helper_hash(head='HEAD'): from cinnabar.git import Git, split_ls_tree from cinnabar.util import one return split_ls_tree(one(Git.iter( 'ls-tree', head, 'helper', cwd=os.path.join(os.path.dirname(__file__), '..'))))[2].decode()
def test_helper_version(self): helper = one(Git.iter( 'ls-tree', 'HEAD', 'helper', cwd=os.path.join(os.path.dirname(__file__), '..'))) self.assertEqual(CmdVersion.helper_version()[1], split_ls_tree(helper)[2])
def test_module_version(self): module = one(Git.iter( 'ls-tree', 'HEAD', 'cinnabar', cwd=os.path.join(os.path.dirname(__file__), '..'))) self.assertEqual(CmdVersion.module_version(), split_ls_tree(module)[2])