X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/d1037d617d8cd2cafc60e67ac0272f86d2e24dfa..3f24ff6b4246a5206555952f6e6c53f6ed5231d8:/tests/test_pdf.py diff --git a/tests/test_pdf.py b/tests/test_pdf.py deleted file mode 100644 index 75b73bc..0000000 --- a/tests/test_pdf.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -# -# This file is part of Librarian, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. -# -import re -from tempfile import NamedTemporaryFile -from nose.tools import * -from librarian import DirDocProvider -from librarian.parser import WLDocument -from utils import get_fixture - - -def test_transform(): - temp = NamedTemporaryFile(delete=False) - temp.close() - WLDocument.from_file( - get_fixture('text', 'asnyk_zbior.xml'), - provider=DirDocProvider(get_fixture('text', '')) - ).as_pdf(save_tex=temp.name) - tex = open(temp.name).read().decode('utf-8') - print tex - - # Check contributor list. - editors = re.search(ur'\\def\\editors\{' - ur'Opracowanie redakcyjne i przypisy: ([^}]*?)\.\s*\}', tex) - assert_equal(editors.group(1), - u"Adam Fikcyjny, Aleksandra Sekuła, Olga Sutkowska")