mirror of https://github.com/zulip/zulip.git
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:
parent
aa8248e734
commit
0824308a7a
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue