Skip to content
Snippets Groups Projects
Commit 6f2d3aba authored by ulif's avatar ulif
Browse files

Rename 'caps' argument.

parent 3a263dbb
No related branches found
No related tags found
No related merge requests found
......@@ -25,10 +25,10 @@ def handle_options(args):
help='number of words to concatenate. Default: 6')
cap_group = parser.add_mutually_exclusive_group()
cap_group.add_argument(
'-c', '--capitalize', action='store_true',
'-c', '--caps', action='store_true',
help='Capitalize words. This is the default.')
cap_group.add_argument(
'--no-capitalize', action='store_false', dest='capitalize',
'--no-caps', action='store_false', dest='capitalize',
help='Turn off capitalization.')
parser.set_defaults(capitalize=True)
args = parser.parse_args(args)
......
......@@ -119,15 +119,15 @@ class TestDicewareModule(object):
out = out.replace(
os.path.basename(sys.argv[0]), 'diceware')
assert out == (
'usage: diceware [-h] [-n NUM] [-c | --no-capitalize]\n'
'usage: diceware [-h] [-n NUM] [-c | --no-caps]\n'
'\n'
'Create a passphrase\n'
'\n'
'optional arguments:\n'
' -h, --help show this help message and exit\n'
' -n NUM, --num NUM number of words to concatenate. Default: 6\n'
' -c, --capitalize Capitalize words. This is the default.\n'
' --no-capitalize Turn off capitalization.\n'
' -c, --caps Capitalize words. This is the default.\n'
' --no-caps Turn off capitalization.\n'
)
def test_main_argv(self, argv_handler):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment