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
31626608
Commit
31626608
authored
10 years ago
by
ulif
Browse files
Options
Downloads
Patches
Plain Diff
Finish move of source.
parent
a50ec064
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
diceware.py
+2
-1
2 additions, 1 deletion
diceware.py
setup.cfg
+1
-1
1 addition, 1 deletion
setup.cfg
setup.py
+2
-2
2 additions, 2 deletions
setup.py
tests/test_diceware.py
+2
-2
2 additions, 2 deletions
tests/test_diceware.py
with
7 additions
and
6 deletions
diceware.py
+
2
−
1
View file @
31626608
...
...
@@ -62,7 +62,8 @@ def get_wordlist_path(lang):
if
not
RE_LANG_CODE
.
match
(
lang
):
raise
ValueError
(
"
Not a valid language code: %s
"
%
lang
)
basename
=
'
wordlist_%s.txt
'
%
lang
return
os
.
path
.
abspath
(
os
.
path
.
join
(
SRC_DIR
,
basename
.
lower
()))
return
os
.
path
.
abspath
(
os
.
path
.
join
(
SRC_DIR
,
'
wordlists
'
,
basename
.
lower
()))
def
insert_special_char
(
word
,
specials
=
SPECIAL_CHARS
,
rnd
=
None
):
...
...
This diff is collapsed.
Click to expand it.
setup.cfg
+
1
−
1
View file @
31626608
...
...
@@ -6,4 +6,4 @@ docs = develop easy_install diceware[docs]
[pytest]
addopts
=
--doctest-modules
--doctest-glob
=
'*.rst'
tests
docs
README.rst
diceware
tests
docs
README.rst
diceware
.py
This diff is collapsed.
Click to expand it.
setup.py
+
2
−
2
View file @
31626608
...
...
@@ -40,7 +40,7 @@ setup(
license
=
"
GPL 3.0
"
,
keywords
=
"
diceware password passphrase
"
,
url
=
"
https://github.com/ulif/diceware/
"
,
packages
=
[
'
diceware
'
],
packages
=
[],
package_data
=
{
'
diceware
'
:
[
'
*.txt
'
,
'
*.asc
'
],
},
...
...
@@ -76,7 +76,7 @@ setup(
cmdclass
=
{
'
test
'
:
PyTest
},
entry_points
=
{
'
console_scripts
'
:
[
'
diceware =
diceware.
diceware:main
'
,
'
diceware = diceware:main
'
,
]
}
)
This diff is collapsed.
Click to expand it.
tests/test_diceware.py
+
2
−
2
View file @
31626608
import
os
import
pytest
import
sys
from
diceware
.diceware
import
(
from
diceware
import
(
SRC_DIR
,
RE_LANG_CODE
,
SPECIAL_CHARS
,
get_wordlist
,
get_wordlist_path
,
insert_special_char
,
get_passphrase
,
handle_options
,
main
,
)
...
...
@@ -33,7 +33,7 @@ class Test_GetWordList(object):
def
test_get_wordlist_en
(
self
):
# we can get a list of words out of english wordlist.
en_src
=
os
.
path
.
join
(
SRC_DIR
,
'
wordlist_en.txt
'
)
en_src
=
os
.
path
.
join
(
SRC_DIR
,
'
wordlists
'
,
'
wordlist_en.txt
'
)
en_result
=
get_wordlist
(
en_src
)
assert
en_result
[
0
]
==
'
a
'
assert
en_result
[
-
1
]
==
'
@
'
...
...
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