[ctypes-commit] ctypes/unittests test_paramflags.py,1.5,1.6
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2005-03-10 14:03:31
|
Update of /cvsroot/ctypes/ctypes/unittests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20588 Modified Files: test_paramflags.py Log Message: Make the test actually work. Index: test_paramflags.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/unittests/test_paramflags.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_paramflags.py 10 Mar 2005 13:57:27 -0000 1.5 --- test_paramflags.py 10 Mar 2005 14:03:21 -0000 1.6 *************** *** 166,170 **** We construct two functions having the same signature: ! >>> def p(a, b, c, d): return a+c, b+d >>> f = get_inout_args_func() >>> f(a=1, b=3) # ctypes function --- 166,172 ---- We construct two functions having the same signature: ! >>> def p(a, b, c, d): ! ... return a+c, b+d ! ... >>> f = get_inout_args_func() >>> f(a=1, b=3) # ctypes function *************** *** 197,210 **** ... TypeError: int expected instead of str instance ! HU? >>> f(a=1, b="y", p1=3, p2=4) Traceback (most recent call last): ... ArgumentError: argument 3: exceptions.TypeError: int expected instead of str instance - HU? >>> f(a=1, b=2, p1="3", p2=4) Traceback (most recent call last): ... ! ArgumentError: argument 3: exceptions.TypeError: int expected instead of str instance >>> """ --- 199,214 ---- ... TypeError: int expected instead of str instance ! >>> ! ! # The following examples show problems with the error messages: ! >>> f(a=1, b="y", p1=3, p2=4) Traceback (most recent call last): ... ArgumentError: argument 3: exceptions.TypeError: int expected instead of str instance >>> f(a=1, b=2, p1="3", p2=4) Traceback (most recent call last): ... ! TypeError: int expected instead of str instance >>> """ |