equal
deleted
inserted
replaced
1 from unittest import TestCase |
|
2 import os.path as osp |
1 import os.path as osp |
|
2 from tempfile import NamedTemporaryFile |
|
3 from subprocess import Popen as sub |
3 from xml.etree.cElementTree import ElementTree, fromstring, tostring, dump |
4 from xml.etree.cElementTree import ElementTree, fromstring, tostring, dump |
4 |
5 |
5 from tempfile import NamedTemporaryFile |
6 from logilab.common.testlib import TestCase, unittest_main |
6 from subprocess import Popen as sub |
|
7 |
7 |
8 from cubicweb.utils import can_do_pdf_conversion |
8 from cubicweb.utils import can_do_pdf_conversion |
9 |
|
10 from cubicweb.ext.xhtml2fo import ReportTransformer |
9 from cubicweb.ext.xhtml2fo import ReportTransformer |
11 |
10 |
12 DATADIR = osp.join(osp.dirname(__file__), 'data') |
11 DATADIR = osp.join(osp.dirname(__file__), 'data') |
13 |
12 |
14 class PDFTC(TestCase): |
13 class PDFTC(TestCase): |
36 self.assertEquals( len(output), len(reference) ) |
35 self.assertEquals( len(output), len(reference) ) |
37 # cut begin & end 'cause they contain variyng data |
36 # cut begin & end 'cause they contain variyng data |
38 self.assertTextEquals(output[150:1500], reference[150:1500]) |
37 self.assertTextEquals(output[150:1500], reference[150:1500]) |
39 |
38 |
40 if __name__ == '__main__': |
39 if __name__ == '__main__': |
41 from logilab.common.testlib import unittest_main |
|
42 unittest_main() |
40 unittest_main() |
43 |
41 |