diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-09-25 22:19:04 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-09-25 22:19:04 (GMT) |
commit | 53d289074458b53d634a9aa922250a5c08b6c2d9 (patch) | |
tree | e11c3ea791864caa646af308d82d101214e82b18 /test/SConscript | |
parent | 2e0de3c55f22b3eaa7767b69740b898f3d2f46bf (diff) | |
download | SCons-53d289074458b53d634a9aa922250a5c08b6c2d9.zip SCons-53d289074458b53d634a9aa922250a5c08b6c2d9.tar.gz SCons-53d289074458b53d634a9aa922250a5c08b6c2d9.tar.bz2 |
Fix tests which break when using print() and no from __future__ import print_function under python 2.7 because the print('a','b') effectively becomes printing a tuple which doesn't match the expected strings
Diffstat (limited to 'test/SConscript')
-rw-r--r-- | test/SConscript/Return.py | 9 | ||||
-rw-r--r-- | test/SConscript/SConscript.py | 2 | ||||
-rw-r--r-- | test/SConscript/env.py | 4 |
3 files changed, 5 insertions, 10 deletions
diff --git a/test/SConscript/Return.py b/test/SConscript/Return.py index 1f678af..dcbedee 100644 --- a/test/SConscript/Return.py +++ b/test/SConscript/Return.py @@ -39,13 +39,8 @@ x = SConscript('SConscript2') y, z = SConscript('SConscript3') a4, b4 = SConscript('SConscript4') foo, bar = SConscript('SConscript5') -print("x =", x) -print("y =", y) -print("z =", z) -print("a4 =", a4) -print("b4 =", b4) -print("foo =", foo) -print("bar =", bar) +for var in ['x','y','z','a4','b4','foo','bar']: + print("%s = %s"%(var,globals()[var])) """) test.write('SConscript1', """\ diff --git a/test/SConscript/SConscript.py b/test/SConscript/SConscript.py index 2eeb211..36288be 100644 --- a/test/SConscript/SConscript.py +++ b/test/SConscript/SConscript.py @@ -37,7 +37,7 @@ import foo assert foo.foo == 4 -print("SConstruct", os.getcwd()) +print("SConstruct "+ os.getcwd()) SConscript('SConscript') x1 = "SConstruct x1" diff --git a/test/SConscript/env.py b/test/SConscript/env.py index a16866c..813d717 100644 --- a/test/SConscript/env.py +++ b/test/SConscript/env.py @@ -50,14 +50,14 @@ test.write(['sub1', 'SConscript'], """\ env = Environment() env.Import("x") print("sub1/SConscript") -print("x =", x) +print("x = %s"%x) """) test.write(['sub2', 'SConscript'], """\ env = Environment() env.Import("y") print("sub2/SConscript") -print("y =", y) +print("y = %s"%y) """) test.write('s1', "\n") |