diff options
Diffstat (limited to 'test/utils.py')
-rw-r--r-- | test/utils.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/test/utils.py b/test/utils.py index de9bc23..e77ccf8 100644 --- a/test/utils.py +++ b/test/utils.py @@ -23,6 +23,16 @@ from __future__ import print_function import sys from io import StringIO +from logilab.common.ureports.nodes import ( + Section, + Text, + Table, + VerbatimText, + List, + Paragraph, + Link, +) + buffers = [StringIO] if sys.version_info < (3, 0): from cStringIO import StringIO as cStringIO @@ -30,8 +40,6 @@ if sys.version_info < (3, 0): buffers += [cStringIO, pStringIO] -from logilab.common.ureports.nodes import * - class WriterTC: def _test_output(self, test_id, layout, msg=None): @@ -42,7 +50,7 @@ class WriterTC: expected = getattr(self, test_id) try: self.assertMultiLineEqual(got, expected) - except: + except Exception: print("**** using a %s" % buffer.__class__) print("**** got for %s" % test_id) print(got) @@ -90,8 +98,3 @@ class WriterTC: table.append(Link("http://www.perdu.com", "toi perdu ?")) table.append(Text("")) self._test_output("advanced_table", table) - - -## def test_image(self): -## layout = Verbatim('blablabla') -## self._test_output('verbatim_base', layout) |