In autodoc, allow customizing the signature of an object via autodoc-process-signature where the built-in mechanism fails.

This commit is contained in:
Georg Brandl
2010-02-21 22:59:53 +01:00
parent b81b7a0463
commit 686824997d
3 changed files with 14 additions and 12 deletions

View File

@@ -169,8 +169,9 @@ def test_format_signature():
assert formatsig('method', 'H.foo', H.foo1, 'a', None) == '(a)'
assert formatsig('method', 'H.foo', H.foo2, None, None) == '(b, *c)'
# test exception handling
raises(TypeError, formatsig, 'function', 'int', int, None, None)
# test exception handling (exception is caught and args is '')
assert formatsig('function', 'int', int, None, None) == ''
del _warnings[:]
# test processing by event handler
assert formatsig('method', 'bar', H.foo1, None, None) == '42'