summaryrefslogtreecommitdiffstats
path: root/test/Variables
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2009-03-08 00:51:26 (GMT)
committerGreg Noel <GregNoel@tigris.org>2009-03-08 00:51:26 (GMT)
commit7f380de2d31a8ca288bd8a44a51de8f2867830be (patch)
treebeffc7420a3c8681158aeefa6b82628fa7121aca /test/Variables
parent4993b28ca2ef767ede531e21450f390683da6b66 (diff)
downloadSCons-7f380de2d31a8ca288bd8a44a51de8f2867830be.zip
SCons-7f380de2d31a8ca288bd8a44a51de8f2867830be.tar.gz
SCons-7f380de2d31a8ca288bd8a44a51de8f2867830be.tar.bz2
Issue 2326, change execfile() to exec ... (FIXED)
Diffstat (limited to 'test/Variables')
-rw-r--r--test/Variables/Variables.py2
-rw-r--r--test/Variables/chdir.py3
2 files changed, 2 insertions, 3 deletions
diff --git a/test/Variables/Variables.py b/test/Variables/Variables.py
index 0e6a152..a6ed74f 100644
--- a/test/Variables/Variables.py
+++ b/test/Variables/Variables.py
@@ -235,7 +235,7 @@ opts.Save('variables.saved', env)
def checkSave(file, expected):
gdict = {}
ldict = {}
- exec string.replace(open(file).read(), '\r', '\n') in gdict, ldict
+ exec open(file, 'rU').read() in gdict, ldict
assert expected == ldict, "%s\n...not equal to...\n%s" % (expected, ldict)
# First test with no command line variables
diff --git a/test/Variables/chdir.py b/test/Variables/chdir.py
index 39eccb3..621e166 100644
--- a/test/Variables/chdir.py
+++ b/test/Variables/chdir.py
@@ -52,8 +52,7 @@ print "VARIABLE =", repr(env['VARIABLE'])
test.write(['bin', 'opts.cfg'], """\
import os
os.chdir(os.path.split(__name__)[0])
-import string
-exec(string.replace(open('opts2.cfg').read(), '\\r', '\\n'))
+exec(open('opts2.cfg', 'rU').read())
""")
test.write(['bin', 'opts2.cfg'], """\