swig/Examples/test-suite/python/argcargvtest_runme3.py
Stefan Zager 62fef1bf99 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
2011-02-03 07:21:37 +00:00

27 lines
475 B
Python

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)