2004-03-08 19:22:15 +00:00
|
|
|
#!/usr/bin/env python
|
2004-05-01 15:35:32 +00:00
|
|
|
import glob
|
2004-06-21 08:38:23 +00:00
|
|
|
import os
|
2004-03-08 19:22:15 +00:00
|
|
|
import sys
|
2004-05-01 15:35:32 +00:00
|
|
|
import unittest
|
2004-03-08 19:22:15 +00:00
|
|
|
|
2004-05-01 15:35:32 +00:00
|
|
|
SKIP_FILES = ['common', 'runtests']
|
2004-03-08 19:22:15 +00:00
|
|
|
|
2004-06-21 08:38:23 +00:00
|
|
|
dir = os.path.split(os.path.abspath(__file__))[0]
|
|
|
|
os.chdir(dir)
|
|
|
|
|
2004-05-01 15:35:32 +00:00
|
|
|
def gettestnames():
|
|
|
|
files = glob.glob('*.py')
|
|
|
|
names = map(lambda x: x[:-3], files)
|
|
|
|
map(names.remove, SKIP_FILES)
|
|
|
|
return names
|
|
|
|
|
|
|
|
suite = unittest.TestSuite()
|
|
|
|
loader = unittest.TestLoader()
|
|
|
|
|
|
|
|
for name in gettestnames():
|
|
|
|
suite.addTest(loader.loadTestsFromName(name))
|
|
|
|
|
|
|
|
testRunner = unittest.TextTestRunner()
|
|
|
|
testRunner.run(suite)
|