planet/runtests.py
2006-08-21 09:43:09 -04:00

15 lines
399 B
Python
Executable File

#!/usr/bin/env python
import glob, trace, unittest, os, sys
# start in a consistent, predictable location
os.chdir(sys.path[0])
# find all of the planet test modules
modules = map(trace.fullmodname, glob.glob(os.path.join('tests', 'test_*.py')))
# load all of the tests into a suite
suite = unittest.TestLoader().loadTestsFromNames(modules)
# run test suite
unittest.TextTestRunner().run(suite)