Commits

Georg Brandl  committed 9640211

Fix test_autodoc after return annotation change.

  • Participants
  • Parent commits c3040d5

Comments (0)

Files changed (1)

File tests/test_autodoc.py

     assert gen.resolve_name('function', 'util.raises') == \
            ('util', ['raises'], None, None)
     assert gen.resolve_name('function', 'util.raises(exc) -> None') == \
-           ('util', ['raises'], 'exc', ' -> None')
+           ('util', ['raises'], 'exc', 'None')
     gen.env.autodoc_current_module = 'util'
     assert gen.resolve_name('function', 'raises') == \
            ('util', ['raises'], None, None)
     assert gen.format_signature('function', 'f', f, None, None) == '(a, b, c=1, **d)'
     assert gen.format_signature('function', 'f', f, 'a, b, c, d', None) == \
            '(a, b, c, d)'
-    assert gen.format_signature('function', 'f', f, None, ' -> None') == \
+    assert gen.format_signature('function', 'f', f, None, 'None') == \
            '(a, b, c=1, **d) -> None'
 
     # test for classes
         pass
     for C in (F, G):
         assert gen.format_signature('class', 'C', C, None, None) == '(a, b=None)'
-    assert gen.format_signature('class', 'C', D, 'a, b', ' -> X') == '(a, b) -> X'
+    assert gen.format_signature('class', 'C', D, 'a, b', 'X') == '(a, b) -> X'
 
     # test for methods
     class H: