tools: Allow optional arguments after file arguments in test_backend.

Fixes #9233.
Uses nargs='*' instead of nargs='argparse.REMAINDER'.
nargs='argparse.REMAINDER' gathers remaining terms as arguments
even if it is an option e.g --coverage, while '*' gathers all the
command-line arguments until the next option is encountered.
This commit is contained in:
Shubham Padia 2018-05-18 17:08:40 +05:30
parent aa8248e734
commit 0824308a7a
1 changed files with 1 additions and 1 deletions

View File

@ -234,7 +234,7 @@ if __name__ == "__main__":
default=False, default=False,
help=("Run the tests which failed the last time " help=("Run the tests which failed the last time "
"test-backend was run. Implies --nonfatal-errors.")) "test-backend was run. Implies --nonfatal-errors."))
parser.add_argument('args', nargs=argparse.REMAINDER) parser.add_argument('args', nargs='*')
options = parser.parse_args() options = parser.parse_args()
args = options.args args = options.args