# -*-*- coding: latin-1 -*-*- import os count = 0 for fileName in os.listdir("."): if fileName.startswith("test_") and fileName.endswith(".py"): rv = os.system("python %s" % fileName) if rv: count +=1 print "%s failed " % fileName print if count: print count, "tests programs failed !" else: print "all tests passed" print