[Python-checkins] python/dist/src/Lib/test test_extcall.py,1.19,1.20
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
2003年5月31日 00:04:19 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv17103/Lib/test
Modified Files:
test_extcall.py
Log Message:
SF bug #733667: kwargs handled incorrectly
The fast_function() inlining optimization only
applies when there are zero keyword arguments.
Index: test_extcall.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_extcall.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** test_extcall.py 27 Feb 2003 20:14:49 -0000 1.19
--- test_extcall.py 31 May 2003 07:04:16 -0000 1.20
***************
*** 2,5 ****
--- 2,8 ----
from UserList import UserList
+ def e(a, b):
+ print a, b
+
def f(*a, **k):
print a, sortdict(k)
***************
*** 22,25 ****
--- 25,36 ----
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: