Use dash instead of underscore in args

--whitelist_file, --blacklist_file is an unusual argument,
because of the underscore usage instead of
--blacklist-file/--blacklist-file .

Adding support for the '-' variant, and documenting only the
the '-' variant in the rst.

Change-Id: I8cc8197719f45bcfc05dc9412a03b9b1fe69e722
This commit is contained in:
Attila Fazekas 2016-08-02 14:28:25 +02:00 committed by afazekas
parent 113e038869
commit 359224b4b0
2 changed files with 6 additions and 6 deletions

View File

@ -13,8 +13,8 @@ default behavior might change in future version.
Summary
-------
ostestr [-b|--blacklist_file <blacklist_file>] [-r|--regex REGEX]
[-w|--whitelist_file <whitelist_file>]
ostestr [-b|--blacklist-file <blacklist_file>] [-r|--regex REGEX]
[-w|--whitelist-file <whitelist_file>]
[-p|--pretty] [--no-pretty] [-s|--subunit] [-l|--list]
[-n|--no-discover <test_id>] [--slowest] [--no-slowest]
[--pdb <test_id>] [--parallel] [--serial]
@ -23,10 +23,10 @@ Summary
Options
-------
--blacklist_file BLACKLIST_FILE, -b BLACKLIST_FILE
--blacklist-file BLACKLIST_FILE, -b BLACKLIST_FILE
Path to a blacklist file, this file contains a
separate regex exclude on each newline
--whitelist_file WHITELIST_FILE, -w WHITELIST_FILE
--whitelist-file WHITELIST_FILE, -w WHITELIST_FILE
Path to a whitelist file, this file contains a
separate regex on each newline
--regex REGEX, -r REGEX

View File

@ -37,11 +37,11 @@ def get_parser(args):
description='Tool to run openstack tests')
parser.add_argument('--version', action='version',
version='%s' % __version__)
parser.add_argument('--blacklist_file', '-b',
parser.add_argument('--blacklist-file', '-b', '--blacklist_file',
help='Path to a blacklist file, this file '
'contains a separate regex exclude on each '
'newline')
parser.add_argument('--whitelist_file', '-w',
parser.add_argument('--whitelist-file', '-w', '--whitelist_file',
help='Path to a whitelist file, this file '
'contains a separate regex on each newline.')
group = parser.add_mutually_exclusive_group()