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
16b114b2
Commit
16b114b2
authored
9 years ago
by
ulif
Browse files
Options
Downloads
Patches
Plain Diff
flake8.
parent
f520a7eb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_wordlist.py
+1
-1
1 addition, 1 deletion
tests/test_wordlist.py
with
1 addition
and
1 deletion
tests/test_wordlist.py
+
1
−
1
View file @
16b114b2
import
os
import
os
import
pytest
import
pytest
import
sys
from
io
import
StringIO
from
io
import
StringIO
from
diceware.wordlist
import
(
from
diceware.wordlist
import
(
WORDLISTS_DIR
,
RE_WORDLIST_NAME
,
RE_NUMBERED_WORDLIST_ENTRY
,
WORDLISTS_DIR
,
RE_WORDLIST_NAME
,
RE_NUMBERED_WORDLIST_ENTRY
,
...
@@ -149,6 +148,7 @@ class TestWordList(object):
...
@@ -149,6 +148,7 @@ class TestWordList(object):
def
test_create_accepts_fd_with_broken_seek
(
self
,
argv_handler
):
def
test_create_accepts_fd_with_broken_seek
(
self
,
argv_handler
):
# we accept files that have no working seek() (like sys.stdin)
# we accept files that have no working seek() (like sys.stdin)
fd
=
StringIO
(
b
"
word1
\n
word2
\n
"
.
decode
(
"
utf-8
"
))
fd
=
StringIO
(
b
"
word1
\n
word2
\n
"
.
decode
(
"
utf-8
"
))
def
broken_seek
(
num
):
def
broken_seek
(
num
):
raise
IOError
(
"
Illegal seek
"
)
raise
IOError
(
"
Illegal seek
"
)
fd
.
seek
=
broken_seek
fd
.
seek
=
broken_seek
...
...
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