Esempio n. 1
0
def main():
    filter_word = ''
    try:
        filter_word = sys.argv[1]
    except IndexError:
        pass

    current_module = sys.modules[__name__]
    for member, module in inspect.getmembers(current_module):
        if member.endswith('_test') and filter_word in member:
            logger.noise("test function: %s, module: %s", member, str(module))
            getattr(current_module, member)()
Esempio n. 2
0
 def ancestor_file(self, vstring, filepath):
     """return the hash of file in one version."""
     args = ('show', '{}:{}'.format(vstring, filepath))
     try:
         output = self._git_exec(*args, decode=False)
     except subprocess.CalledProcessError as ex:
         logger.noise('this path is not exists on disk in version %s:%s', vstring, filepath)
         logger.noise('subprocess error message: %s', ex)
         logger.noise('stderr fatal message: %s', ex.output)
         return ''
     else:
         return byte_hash(output)