From 359224b4b0f8bab85052c3d425334b95f3372522 Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Tue, 2 Aug 2016 14:28:25 +0200 Subject: [PATCH] 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 --- doc/source/ostestr.rst | 8 ++++---- os_testr/ostestr.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/source/ostestr.rst b/doc/source/ostestr.rst index 71d3da8..9bfdd87 100644 --- a/doc/source/ostestr.rst +++ b/doc/source/ostestr.rst @@ -13,8 +13,8 @@ default behavior might change in future version. Summary ------- - ostestr [-b|--blacklist_file ] [-r|--regex REGEX] - [-w|--whitelist_file ] + ostestr [-b|--blacklist-file ] [-r|--regex REGEX] + [-w|--whitelist-file ] [-p|--pretty] [--no-pretty] [-s|--subunit] [-l|--list] [-n|--no-discover ] [--slowest] [--no-slowest] [--pdb ] [--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 diff --git a/os_testr/ostestr.py b/os_testr/ostestr.py index 3a7a8fa..918599f 100755 --- a/os_testr/ostestr.py +++ b/os_testr/ostestr.py @@ -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()