def make_tests(input_dir, msg_dir, filter_rgx, callbacks):
 if filter_rgx:
  is_to_run = re.compile(filter_rgx).search
 else:
  is_to_run = (lambda x: 1)
 tests = []
 for (module_file, messages_file) in get_tests_info(input_dir, msg_dir, 'func_', ''):
  if ((not is_to_run(module_file)) or module_file.endswith('.pyc')):
   continue
  base = module_file.replace('func_', '').replace('.py', '')
  dependencies = get_tests_info(input_dir, msg_dir, base, '.py')
  for callback in callbacks:
   test = callback(input_dir, msg_dir, module_file, messages_file, dependencies)
   if test:
    tests.append(test)
 return tests

def make_tests ( input_dir , msg_dir , filter_rgx , callbacks ) : if filter_rgx : is_to_run = re . compile ( filter_rgx ) . search else : is_to_run = ( lambda x : 1 ) tests = [ ] for ( module_file , messages_file ) in get_tests_info ( input_dir , msg_dir , 'func_' , '' ) : if ( ( not is_to_run ( module_file ) ) or module_file . endswith ( '.pyc' ) ) : continue base = module_file . replace ( 'func_' , '' ) . replace ( '.py' , '' ) dependencies = get_tests_info ( input_dir , msg_dir , base , '.py' ) for callback in callbacks : test = callback ( input_dir , msg_dir , module_file , messages_file , dependencies ) if test : tests . append ( test ) return tests
generate tests classes from test info return the list of generated test classes .