summaryrefslogtreecommitdiff
path: root/test/Deprecated
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2009-03-08 00:51:26 +0000
committerGreg Noel <GregNoel@tigris.org>2009-03-08 00:51:26 +0000
commitfc876e9782514b00815cd41a5cded94345b59a03 (patch)
treebeffc7420a3c8681158aeefa6b82628fa7121aca /test/Deprecated
parente67fe4c80b6c241fcb45d3e4a4387b90dae7638f (diff)
downloadscons-fc876e9782514b00815cd41a5cded94345b59a03.tar.gz
Issue 2326, change execfile() to exec ... (FIXED)
Diffstat (limited to 'test/Deprecated')
-rw-r--r--test/Deprecated/Options/Options.py2
-rw-r--r--test/Deprecated/Options/chdir.py3
2 files changed, 2 insertions, 3 deletions
diff --git a/test/Deprecated/Options/Options.py b/test/Deprecated/Options/Options.py
index f4114789..d1c7114d 100644
--- a/test/Deprecated/Options/Options.py
+++ b/test/Deprecated/Options/Options.py
@@ -241,7 +241,7 @@ opts.Save('options.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 options
diff --git a/test/Deprecated/Options/chdir.py b/test/Deprecated/Options/chdir.py
index 547fe534..a8fb6c6b 100644
--- a/test/Deprecated/Options/chdir.py
+++ b/test/Deprecated/Options/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'], """\