[Python-checkins] CVS: python/dist/src/Lib/test test_extcall.py,NONE,1.1 test_grammar.py,1.12,1.13
Jeremy Hylton
python-dev@python.org
Tue, 28 Mar 2000 18:51:16 -0500
- Previous message: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.168,2.169 compile.c,2.100,2.101 graminit.c,2.22,2.23
- Next message: [Python-checkins] CVS: python/dist/src/Lib/test/output test_extcall,NONE,1.1 test_grammar,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /projects/cvsroot/python/dist/src/Lib/test
In directory goon.cnri.reston.va.us:/home/jhylton/python/src/Lib/test
Modified Files:
test_grammar.py
Added Files:
test_extcall.py
Log Message:
add test cases for Greg Ewing's extended call syntax patch
Index: test_grammar.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Lib/test/test_grammar.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** test_grammar.py 1997/04/16 00:27:45 1.12
--- test_grammar.py 2000/03/28 23:51:13 1.13
***************
*** 141,149 ****
### 'def' NAME parameters ':' suite
### parameters: '(' [varargslist] ')'
! ### varargslist: (fpdef ['=' test] ',')* '*' NAME
! ### | fpdef ['=' test] (',' fpdef ['=' test])* [',']
### fpdef: NAME | '(' fplist ')'
### fplist: fpdef (',' fpdef)* [',']
def f1(): pass
def f2(one_argument): pass
def f3(two, arguments): pass
--- 141,155 ----
### 'def' NAME parameters ':' suite
### parameters: '(' [varargslist] ')'
! ### varargslist: (fpdef ['=' test] ',')* ('*' NAME [',' ('**'|'*' '*') NAME]
! ### | ('**'|'*' '*') NAME)
! ### | fpdef ['=' test] (',' fpdef ['=' test])* [',']
### fpdef: NAME | '(' fplist ')'
### fplist: fpdef (',' fpdef)* [',']
+ ### arglist: (argument ',')* (argument | *' test [',' '**' test] | '**' test)
+ ### argument: [test '='] test # Really [keyword '='] test
def f1(): pass
+ f1()
+ f1(*())
+ f1(*(), **{})
def f2(one_argument): pass
def f3(two, arguments): pass
***************
*** 158,171 ****
--- 164,188 ----
d01()
d01(1)
+ d01(*(1,))
+ d01(**{'a':2})
def d11(a, b=1): pass
d11(1)
d11(1, 2)
+ d11(1, **{'b':2})
def d21(a, b, c=1): pass
d21(1, 2)
d21(1, 2, 3)
+ d21(*(1, 2, 3))
+ d21(1, *(2, 3))
+ d21(1, 2, *(3,))
+ d21(1, 2, **{'c':3})
def d02(a=1, b=2): pass
d02()
d02(1)
d02(1, 2)
+ d02(*(1, 2))
+ d02(1, *(2,))
+ d02(1, **{'b':2})
+ d02(**{'a': 1, 'b': 2})
def d12(a, b=1, c=2): pass
d12(1)
***************
*** 180,183 ****
--- 197,203 ----
d01v(1)
d01v(1, 2)
+ d01v(*(1, 2, 3, 4))
+ d01v(*(1,))
+ d01v(**{'a':2})
def d11v(a, b=1, *rest): pass
d11v(1)
***************
*** 188,191 ****
--- 208,213 ----
d21v(1, 2, 3)
d21v(1, 2, 3, 4)
+ d21v(*(1, 2, 3, 4))
+ d21v(1, 2, **{'c': 3})
def d02v(a=1, b=2, *rest): pass
d02v()
***************
*** 193,196 ****
--- 215,220 ----
d02v(1, 2)
d02v(1, 2, 3)
+ d02v(1, *(2, 3, 4))
+ d02v(**{'a': 1, 'b': 2})
def d12v(a, b=1, c=2, *rest): pass
d12v(1)
***************
*** 198,201 ****
--- 222,228 ----
d12v(1, 2, 3)
d12v(1, 2, 3, 4)
+ d12v(*(1, 2, 3, 4))
+ d12v(1, 2, *(3, 4, 5))
+ d12v(1, *(2,), **{'c': 3})
def d22v(a, b, c=1, d=2, *rest): pass
d22v(1, 2)
***************
*** 203,206 ****
--- 230,236 ----
d22v(1, 2, 3, 4)
d22v(1, 2, 3, 4, 5)
+ d22v(*(1, 2, 3, 4))
+ d22v(1, 2, *(3, 4, 5))
+ d22v(1, *(2, 3), **{'d': 4})
### stmt: simple_stmt | compound_stmt
***************
*** 456,459 ****
--- 486,490 ----
v3(1,(2,3),4)
v3(1,(2,3),4,5,6,7,8,9,0)
+ print
import sys, time
c = sys.path[0]
- Previous message: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.168,2.169 compile.c,2.100,2.101 graminit.c,2.22,2.23
- Next message: [Python-checkins] CVS: python/dist/src/Lib/test/output test_extcall,NONE,1.1 test_grammar,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]