Closed jomey closed 4 years ago
Should have explained the intentions behind the testing, so my bad.
Main idea here is to ensure that the options defined with ArgumentParser
are also accepted with the command line. I was stomped yesterday and doubted my ability to read command line options, when I tried to execute:
gen_maxus -W 30 ...
and kept getting the error that this is an unknown option.
When I checked the source code, I discovered that the metavar
option should only be used as a label for the option in the help text and not as an additional short option.
The tests ensure now that both the long format and short are accepted. So
gen_maxus --window
and
gen_maxus -W
both work. Added this to all options including checking for default values.
Well then it certainly makes sense to have both options working! Thanks for changing that.
And update this PR with master
from your last PR that was merged.
Repeating the main commit message: