Basic test running added

This commit is contained in:
Jeremy Fincher 2003-04-03 06:59:00 +00:00
parent 9e05519660
commit 0984db5503

View File

@ -29,4 +29,23 @@
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
import sys
sys.path.insert(0, 'src')
sys.path.insert(0, 'test')
from fix import *
import sys
import glob
import os.path
import unittest import unittest
if __name__ == '__main__':
if len(sys.argv) > 1:
names = sys.argv[1:]
else:
files = glob.glob(os.path.join('test', '*_test.py'))
names = [os.path.splitext(os.path.basename(file))[0] for file in files]
suite = unittest.defaultTestLoader.loadTestsFromNames(names)
runner = unittest.TextTestRunner(verbosity=1)
runner.run(suite)