Esempio n. 1
0
 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])
Esempio n. 2
0
 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])
Esempio n. 3
0
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]
Esempio n. 4
0
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()
Esempio n. 5
0
 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])
Esempio n. 6
0
 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])