diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-03-21 20:30:30 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-03-21 20:30:30 +0000 |
commit | bb9d726357854a8dcae597e22d02f5d3a2122431 (patch) | |
tree | 4b992c7523434f75583957b045ede23739e68b53 /Lib/test/test_extcall.py | |
parent | 965458931ff6fae2090fa4ddd95cb7f81ce2bcc1 (diff) | |
download | cpython-git-bb9d726357854a8dcae597e22d02f5d3a2122431.tar.gz |
take into account keyword arguments when passing too many args
Diffstat (limited to 'Lib/test/test_extcall.py')
-rw-r--r-- | Lib/test/test_extcall.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_extcall.py b/Lib/test/test_extcall.py index bb922c884d..950ac28e72 100644 --- a/Lib/test/test_extcall.py +++ b/Lib/test/test_extcall.py @@ -279,6 +279,15 @@ A obscure message: Traceback (most recent call last): ... TypeError: f() takes exactly 2 arguments (1 given) + +The number of arguments passed in includes keywords: + + >>> def f(a): + ... pass + >>> f(6, a=4, *(1, 2, 3)) + Traceback (most recent call last): + ... + TypeError: f() takes exactly 1 argument (5 given) """ import unittest |