Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
logilab-mtconverter
Commits
961d3c94b81d
Commit
f9b379c2
authored
Jan 08, 2015
by
Julien Cristau
Browse files
[test] fix failure on python3
binary files shouldn't be opened in text mode
parent
a5f67ac307a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/unittest_transforms.py
View file @
961d3c94
...
...
@@ -96,7 +96,7 @@ r2MAoIO1DSsuM23SzgmqubGJEZuSRWhR
self
.
skipTest
(
'pdflatex not installed'
)
else
:
raise
data
=
TransformData
(
open
(
osp
.
join
(
DATAPATH
,
'hello.pdf'
)).
read
(),
data
=
TransformData
(
open
(
osp
.
join
(
DATAPATH
,
'hello.pdf'
)
,
'rb'
).
read
(),
'application/pdf'
,
'utf8'
)
converted
=
ENGINE
.
convert
(
data
,
'text/plain'
).
decode
().
strip
()
self
.
assertEqual
(
converted
,
u
'hello'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment