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
f0df820f
Commit
f0df820f
authored
10 years ago
by
ulif
Browse files
Options
Downloads
Patches
Plain Diff
Add print_version test.
parent
73489e3b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_diceware.py
+8
-1
8 additions, 1 deletion
tests/test_diceware.py
with
8 additions
and
1 deletion
tests/test_diceware.py
+
8
−
1
View file @
f0df820f
...
...
@@ -6,7 +6,7 @@ from io import StringIO
from
diceware
import
(
SRC_DIR
,
RE_LANG_CODE
,
SPECIAL_CHARS
,
get_wordlist
,
get_wordlist_path
,
insert_special_char
,
get_passphrase
,
handle_options
,
main
,
__version__
,
handle_options
,
main
,
__version__
,
print_version
,
)
...
...
@@ -144,6 +144,13 @@ class TestDicewareModule(object):
phrase
=
get_passphrase
(
capitalized
=
False
)
assert
phrase
.
lower
()
==
phrase
def
test_print_version
(
self
,
capsys
):
# we can print version infos
print_version
()
out
,
err
=
capsys
.
readouterr
()
assert
err
==
''
assert
__version__
in
out
def
test_handle_options
(
self
):
# we can get help
with
pytest
.
raises
(
SystemExit
)
as
exc_info
:
...
...
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