- Bug #891637, patch #1005466: fix inspect.getargs() crash on def foo((bar)).

This commit is contained in:
Matthias Klose 2004-08-15 17:04:33 +00:00
parent e5069019e7
commit 2e829c0214
3 changed files with 25 additions and 7 deletions

View file

@ -374,3 +374,11 @@ test(defaults is None, 'A.m defaults')
# Doc/lib/libinspect.tex claims there are 11 such functions
count = len(filter(lambda x:x.startswith('is'), dir(inspect)))
test(count == 11, "There are %d (not 11) is* functions", count)
def sublistOfOne((foo)): return 1
args, varargs, varkw, defaults = inspect.getargspec(sublistOfOne)
test(args == [['foo']], 'sublistOfOne args')
test(varargs is None, 'sublistOfOne varargs')
test(varkw is None, 'sublistOfOne varkw')
test(defaults is None, 'sublistOfOn defaults')