summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_inspect.py
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2004-08-15 17:04:33 (GMT)
committerMatthias Klose <doko@ubuntu.com>2004-08-15 17:04:33 (GMT)
commit2e829c0214fc68655f1aaf2d4279697ee55394b3 (patch)
tree6e4a0cb9f8849395f2b6029d3897b08327898090 /Lib/test/test_inspect.py
parente5069019e7bd33ed5d6072c38ad149694053aaca (diff)
downloadcpython-2e829c0214fc68655f1aaf2d4279697ee55394b3.zip
cpython-2e829c0214fc68655f1aaf2d4279697ee55394b3.tar.gz
cpython-2e829c0214fc68655f1aaf2d4279697ee55394b3.tar.bz2
- Bug #891637, patch #1005466: fix inspect.getargs() crash on def foo((bar)).
Diffstat (limited to 'Lib/test/test_inspect.py')
-rw-r--r--Lib/test/test_inspect.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index bdbec41..2f79fc3 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -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')