docs: Add note about args vs. positional args
The python's argparse is quite clever and usually evaluates the
positionals and arguments correctly. But with subparsers or weird test
names it might falsely evaluate test name as argument, for example:
avocado run --my_test
avocado run passtest.py --show-job-log failtest.py
those will fail as --my_test looks like an invalid option and
--show-job-log is subparser's option not known to the main parser but as
the main parser already filled positionals it evaluates the
`failtest.py` as extra argument.
The most appropriate way to distinguish between args and positional args
is the `--` separator:
avocado run -- --my_test
avocado run --show-job-log -- passtest.py failtest.py
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
Showing
想要评论请 注册 或 登录