Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
diceware-debian
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drebs
diceware-debian
Commits
cc7dacb6
Commit
cc7dacb6
authored
9 years ago
by
ulif
Browse files
Options
Downloads
Patches
Plain Diff
Output wordlists dir in help.
parent
e6a83a61
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
diceware/__init__.py
+4
-1
4 additions, 1 deletion
diceware/__init__.py
tests/exp_help_output.txt
+3
-0
3 additions, 0 deletions
tests/exp_help_output.txt
tests/test_diceware.py
+1
-0
1 addition, 0 deletions
tests/test_diceware.py
with
8 additions
and
1 deletion
diceware/__init__.py
+
4
−
1
View file @
cc7dacb6
...
...
@@ -87,7 +87,10 @@ def handle_options(args):
"""
Handle commandline options.
"""
random_sources
=
get_random_sources
().
keys
()
parser
=
argparse
.
ArgumentParser
(
description
=
"
Create a passphrase
"
)
parser
=
argparse
.
ArgumentParser
(
description
=
"
Create a passphrase
"
,
epilog
=
"
Wordlists are stored in %s
"
%
WORDLISTS_DIR
)
parser
.
add_argument
(
'
-n
'
,
'
--num
'
,
default
=
6
,
type
=
int
,
help
=
'
number of words to concatenate. Default: 6
'
)
...
...
This diff is collapsed.
Click to expand it.
tests/exp_help_output.txt
+
3
−
0
View file @
cc7dacb6
...
...
@@ -20,3 +20,6 @@ optional arguments:
Get randomness from this source. Possible values:
`realdice', `system'. Default: system
--version output version information and exit.
Wordlists are stored in
<PATH-TO-WORDLISTS-DIR>
This diff is collapsed.
Click to expand it.
tests/test_diceware.py
+
1
−
0
View file @
cc7dacb6
...
...
@@ -304,6 +304,7 @@ class TestDicewareModule(object):
os
.
path
.
dirname
(
__file__
),
'
exp_help_output.txt
'
)
with
open
(
expected_path
,
'
r
'
)
as
fd
:
expected_output
=
fd
.
read
()
out
=
out
.
replace
(
WORDLISTS_DIR
,
"
<PATH-TO-WORDLISTS-DIR>
"
)
assert
out
==
expected_output
def
test_main_version
(
self
,
argv_handler
,
capsys
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment