diff options
Diffstat (limited to 'tests/test_autosummary.py')
-rw-r--r-- | tests/test_autosummary.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_autosummary.py b/tests/test_autosummary.py index de26a054..8803f88d 100644 --- a/tests/test_autosummary.py +++ b/tests/test_autosummary.py @@ -10,7 +10,8 @@ """ import sys from functools import wraps -from StringIO import StringIO + +from six import iteritems, StringIO from sphinx.ext.autosummary import mangle_signature @@ -71,7 +72,7 @@ def test_mangle_signature(): (a=1, b=<SomeClass: a, b, c>, c=3) :: ([a, b, c]) """ - TEST = [map(lambda x: x.strip(), x.split("::")) for x in TEST.split("\n") + TEST = [[y.strip() for y in x.split("::")] for x in TEST.split("\n") if '::' in x] for inp, outp in TEST: res = mangle_signature(inp).strip().replace(u"\u00a0", " ") @@ -114,7 +115,7 @@ def test_get_items_summary(app): 'C.prop_attr2': 'This is a attribute docstring', 'C.C2': 'This is a nested inner class docstring', } - for key, expected in expected_values.iteritems(): + for key, expected in iteritems(expected_values): assert autosummary_items[key][2] == expected, 'Summary for %s was %r -'\ ' expected %r' % (key, autosummary_items[key], expected) |