shithub: aubio

ref: 97525e4f81d3798352e3a0ba310d857993661a77
dir: /python/test/list_missing_tests/

View raw version
#! /usr/bin/python

from glob import glob
from os.path import splitext, exists
import sys

if len(sys.argv) > 1: verbose = True
else: verbose = False

cfiles = [ file.split('/')[-1] for file in glob('../../src/*.c') ]
cfiles.sort()

for cfile in cfiles: 
  pythonfile=splitext(cfile)[0]+'.py'
  if not exists(pythonfile):
    print "[X] %30s" % cfile, "[ ] %30s" % pythonfile
    #print cfile, "has NO test", pythonfile
  elif verbose:
    print "[X] %30s" % cfile, "[X] %30s" % pythonfile

pythonfiles = [ file.split('/')[-1] for file in glob('*.py') ]
pythonfiles.sort()

for pythonfile in pythonfiles: 
  cfile=splitext(pythonfile)[0]+'.c'
  if not exists('../../'+cfile):
    print "[ ] %30s" % cfile, "[X] %30s" % pythonfile
    #print pythonfile, "has NO source", cfile
  elif verbose:
    print "[X] %30s" % cfile, "[X] %30s" % pythonfile