fnp
/
librarian.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prettier authors on covers.
[librarian.git]
/
tests
/
test_epub.py
diff --git
a/tests/test_epub.py
b/tests/test_epub.py
index
faa76e7
..
4ac874a
100644
(file)
--- a/
tests/test_epub.py
+++ b/
tests/test_epub.py
@@
-3,6
+3,8
@@
# This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
# This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
+from __future__ import unicode_literals
+
from zipfile import ZipFile
from lxml import html
from nose.tools import *
from zipfile import ZipFile
from lxml import html
from nose.tools import *
@@
-25,7
+27,18
@@
def test_transform():
for par in tree.findall("//p"):
if par.text.startswith(u'Opracowanie redakcyjne i przypisy:'):
editors_attribution = True
for par in tree.findall("//p"):
if par.text.startswith(u'Opracowanie redakcyjne i przypisy:'):
editors_attribution = True
- assert_equal(par.text.rstrip(),
+ assert_equal(
+ par.text.rstrip(),
u'Opracowanie redakcyjne i przypisy: '
u'Adam Fikcyjny, Aleksandra Sekuła, Olga Sutkowska.')
assert_true(editors_attribution)
u'Opracowanie redakcyjne i przypisy: '
u'Adam Fikcyjny, Aleksandra Sekuła, Olga Sutkowska.')
assert_true(editors_attribution)
+
+
+def test_transform_hyphenate():
+ epub = WLDocument.from_file(
+ get_fixture('text', 'asnyk_zbior.xml'),
+ provider=DirDocProvider(get_fixture('text', ''))
+ ).as_epub(
+ flags=['without_fonts'],
+ hyphenate=True
+ ).get_file()