shithub: aubio

Download patch

ref: 6bec1ed6f67600c1027ca79da426262a3c0bc959
parent: e34b0101944dbd29c994deeabc481d7aa0032b9f
author: Paul Brossier <piem@piem.org>
date: Wed Oct 17 14:17:59 EDT 2007

list_missing_tests: add script to get the list of missing test files

--- /dev/null
+++ b/python/test/list_missing_tests
@@ -1,0 +1,30 @@
+#! /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