def main_check_all():
 for (test_file, src_file) in PERFECT_FILES:
  if (test_file is None):
   continue
  subprocess.check_call([sys.executable, '-m', 'pytest', '--cov', 'qutebrowser', '--cov-report', 'xml', test_file])
  with open('coverage.xml', encoding='utf-8') as f:
   messages = check(f, [(test_file, src_file)])
  os.remove('coverage.xml')
  messages = [msg for msg in messages if (msg.typ == MsgType.insufficent_coverage)]
  if messages:
   for msg in messages:
    print msg.text
   return 1
  else:
   print 'Check ok!'
 return 0

def main_check_all ( ) : for ( test_file , src_file ) in PERFECT_FILES : if ( test_file is None ) : continue subprocess . check_call ( [ sys . executable , '-m' , 'pytest' , '--cov' , 'qutebrowser' , '--cov-report' , 'xml' , test_file ] ) with open ( 'coverage.xml' , encoding = 'utf-8' ) as f : messages = check ( f , [ ( test_file , src_file ) ] ) os . remove ( 'coverage.xml' ) messages = [ msg for msg in messages if ( msg . typ == MsgType . insufficent_coverage ) ] if messages : for msg in messages : print msg . text return 1 else : print 'Check ok!' return 0
check the coverage for all files individually .