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
3ae5c4c5caaf
Commit
32bacbdf
authored
Jun 19, 2020
by
Laurent Peuch
Browse files
test: migrate to pytest
parent
ca91bedde898
Changes
4
Hide whitespace changes
Inline
Side-by-side
test/
unit
test_engine.py
→
test/test_engine.py
View file @
3ae5c4c5
File moved
test/
unit
test_transforms.py
→
test/test_transforms.py
View file @
3ae5c4c5
...
...
@@ -37,6 +37,7 @@ import os
import
os.path
as
osp
import
errno
import
subprocess
import
pytest
DATAPATH
=
osp
.
dirname
(
__file__
)
...
...
@@ -64,8 +65,8 @@ class MiscTransformsTC(TestCase):
converted
=
ENGINE
.
convert
(
data
,
"text/plain"
).
decode
().
strip
()
self
.
assertEqual
(
converted
,
u
"yo
\n
zogzog"
)
@
pytest
.
mark
.
skip
(
"Encoding detection with chardet does not work"
)
def
test_html_to_text_noenc
(
self
):
self
.
skipTest
(
"Encoding detection with chardet does not work"
)
# will trigger guess_encoding, check non-utf8 encoding
data
=
TransformData
(
u
"<b>yo (l'tat l'oeuf)</b>"
.
encode
(
"latin1"
),
"text/html"
...
...
test/
unit
test_utils.py
→
test/test_utils.py
View file @
3ae5c4c5
File moved
tox.ini
View file @
3ae5c4c5
...
...
@@ -6,8 +6,9 @@ deps =
pygments
pdflatex
pillow
pytest
=
= 5.4.1
commands
=
logilab-pytest
-t
test
{posargs
}
{envpython}
-m
pytest
{posargs:{toxinidir}/test
}
[testenv:py3-from-forge]
deps
=
...
...
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