python3 support; passes all regressions.
Adding argcargvtest_runme3.py, because 2to3 can't handle it. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12425 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
00b5fa9c47
commit
62fef1bf99
6 changed files with 143 additions and 13 deletions
27
Examples/test-suite/python/argcargvtest_runme3.py
Normal file
27
Examples/test-suite/python/argcargvtest_runme3.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
from argcargvtest import *
|
||||
|
||||
largs=['hi','hola','hello']
|
||||
if mainc(largs) != 3:
|
||||
raise RuntimeError("bad main typemap")
|
||||
|
||||
targs=('hi','hola')
|
||||
if mainv(targs,1) != 'hola':
|
||||
print(mainv(targs,1))
|
||||
raise RuntimeError("bad main typemap")
|
||||
|
||||
targs=('hi', 'hola')
|
||||
if mainv(targs,1) != 'hola':
|
||||
raise RuntimeError("bad main typemap")
|
||||
|
||||
try:
|
||||
error = 0
|
||||
mainv('hello',1)
|
||||
error = 1
|
||||
except TypeError:
|
||||
pass
|
||||
if error:
|
||||
raise RuntimeError("bad main typemap")
|
||||
|
||||
|
||||
|
||||
initializeApp(largs)
|
||||
Loading…
Add table
Add a link
Reference in a new issue