blob: f7fd69a4ed1d2b016b81a5606174bad58cdb6593 [file] [log] [blame]
#!/usr/bin/python2.4
import os, sys
import unittest
# ensure the root is where it should be
root = os.path.dirname(__file__)
sys.path.append(root)
suites = []
def lister(dummy, dirname, files):
loader = unittest.TestLoader()
for f in files:
if f.endswith('_unittest.py'):
temp = os.path.join(dirname, f).strip('.py')
mod = temp[1:].replace('/', '.')
suite = loader.loadTestsFromName(mod)
suites.append(suite)
if __name__ == "__main__":
os.path.walk(root, lister, None)
alltests = unittest.TestSuite(suites)
runner = unittest.TextTestRunner(verbosity=2)
runner.run(alltests)
#!/usr/bin/python2.4
import os, sys
import unittest
# ensure the root is where it should be
root = os.path.dirname(__file__)
sys.path.append(root)
suites = []
def lister(dummy, dirname, files):
loader = unittest.TestLoader()
for f in files:
if f.endswith('_unittest.py'):
temp = os.path.join(dirname, f).strip('.py')
mod = temp[1:].replace('/', '.')
suite = loader.loadTestsFromName(mod)
suites.append(suite)
if __name__ == "__main__":
os.path.walk(root, lister, None)
alltests = unittest.TestSuite(suites)
runner = unittest.TextTestRunner(verbosity=2)
runner.run(alltests)