summaryrefslogtreecommitdiff
path: root/test/utils.py
diff options
context:
space:
mode:
authorLaurent Peuch <cortex@worlddomination.be>2020-03-19 12:24:34 +0100
committerLaurent Peuch <cortex@worlddomination.be>2020-03-19 12:24:34 +0100
commit0509e03d3f295862ca15986c004ae6c48917b15f (patch)
treef7b45e84ba72e3347faa6c456cf1014f34f63e8e /test/utils.py
parenta4237c8c1a66364ef5ff522b62c3089b3a6b5724 (diff)
downloadlogilab-common-0509e03d3f295862ca15986c004ae6c48917b15f.tar.gz
Please the flake8 god
Diffstat (limited to 'test/utils.py')
-rw-r--r--test/utils.py19
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)