mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
This commit is contained in:
parent
e5069019e7
commit
2e829c0214
3 changed files with 25 additions and 7 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue