summaryrefslogtreecommitdiffstats
path: root/test/SWIG
diff options
context:
space:
mode:
authorCraig Rodrigues <rodrigc@FreeBSD.org>2017-03-11 12:09:11 (GMT)
committerCraig Rodrigues <rodrigc@FreeBSD.org>2017-03-11 12:09:11 (GMT)
commitc14936494d79a00b533e7e8ce9a41e5176c1295f (patch)
tree079546afb1d6be21831851837d10f4af1d738018 /test/SWIG
parent055c8046afce036fdfad4bc8d60e4059da148f7d (diff)
downloadSCons-c14936494d79a00b533e7e8ce9a41e5176c1295f.zip
SCons-c14936494d79a00b533e7e8ce9a41e5176c1295f.tar.gz
SCons-c14936494d79a00b533e7e8ce9a41e5176c1295f.tar.bz2
Use print() function. Fixes py2/3
Diffstat (limited to 'test/SWIG')
-rw-r--r--test/SWIG/live.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/SWIG/live.py b/test/SWIG/live.py
index 5e95dc7..05971aa 100644
--- a/test/SWIG/live.py
+++ b/test/SWIG/live.py
@@ -131,8 +131,9 @@ test.run(arguments = ldmodule_prefix+'foo' + _dll)
test.must_not_exist(test.workpath('wrapper.out'))
test.run(program = python, stdin = """\
+from __future__ import print_function
import foo
-print foo.foo_string()
+print(foo.foo_string())
""", stdout="""\
This is foo.c!
""")
@@ -144,10 +145,11 @@ test.run(arguments = ldmodule_prefix+'bar' + _dll)
test.must_match('wrapper.out', "wrapper.py\n")
test.run(program = python, stdin = """\
+from __future__ import print_function
import foo
import bar
-print foo.foo_string()
-print bar.bar_string()
+print(foo.foo_string())
+print(bar.bar_string())
""", stdout="""\
This is foo.c!
This is bar.c!