Fix option handling of the unittest runner.
This commit is contained in:
parent
4c4fe501d6
commit
9f52881d6e
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue