Fix option handling of the unittest runner.

This commit is contained in:
Stephan Erb 2008-08-27 18:55:18 +00:00
parent 4c4fe501d6
commit 9f52881d6e
2 changed files with 4 additions and 1 deletions

View File

@ -3,7 +3,9 @@ import os.path
import getopt
use_x = True
opts, args = getopt.getopt(sys.argv[1:], 'n', ['no-x'])
shortargs = 'hnv:'
longargs = 'help no-x verbose='
opts, args = getopt.getopt(sys.argv[1:], shortargs, longargs.split())
for o, a in opts:
if o in ('-n', '--no-x'):
use_x = False

View File

@ -25,6 +25,7 @@ for o, a in opts:
verbose = int(a)
except:
print 'verbose must be a number >= 0'
sys.exit(2)
# new test modules need to be added manually
modules = ( 'test_caps',