summaryrefslogtreecommitdiff
path: root/Lib/test/test_extcall.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-05-31 07:04:16 +0000
committerRaymond Hettinger <python@rcn.com>2003-05-31 07:04:16 +0000
commit40174c358fc87cd1af79969e60da5d76093768a3 (patch)
tree0ea3e622119884d25d7540adc3c333861d4d5d2a /Lib/test/test_extcall.py
parentca2a2f11d0ee7c8dee0f74d001c6f3f7d15adac9 (diff)
downloadcpython-git-40174c358fc87cd1af79969e60da5d76093768a3.tar.gz
SF bug #733667: kwargs handled incorrectly
The fast_function() inlining optimization only applies when there are zero keyword arguments.
Diffstat (limited to 'Lib/test/test_extcall.py')
-rw-r--r--Lib/test/test_extcall.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_extcall.py b/Lib/test/test_extcall.py
index d3c2e3f26a..f85baf8e4d 100644
--- a/Lib/test/test_extcall.py
+++ b/Lib/test/test_extcall.py
@@ -1,6 +1,9 @@
from test.test_support import verify, verbose, TestFailed, sortdict
from UserList import UserList
+def e(a, b):
+ print a, b
+
def f(*a, **k):
print a, sortdict(k)
@@ -22,6 +25,14 @@ f(1, 2, 3, **{'a':4, 'b':5})
f(1, 2, 3, *(4, 5), **{'a':6, 'b':7})
f(1, 2, 3, x=4, y=5, *(6, 7), **{'a':8, 'b':9})
+# Verify clearing of SF bug #733667
+try:
+ e(c=3)
+except TypeError:
+ pass
+else:
+ print "should raise TypeError: e() got an unexpected keyword argument 'c'"
+
try:
g()
except TypeError, err: