Fixed bug in argument handling

This commit is contained in:
Jeremy Fincher 2003-04-03 07:11:39 +00:00
parent 073188eb25
commit 6b4636e8ae
1 changed files with 2 additions and 2 deletions

View File

@ -42,10 +42,10 @@ import unittest
if __name__ == '__main__':
if len(sys.argv) > 1:
names = sys.argv[1:]
files = 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]
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)