diff options
author | Greg Noel <GregNoel@tigris.org> | 2009-03-02 03:19:29 +0000 |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2009-03-02 03:19:29 +0000 |
commit | 1573ab84d1cece0367dfd7e804aee39d40f9f849 (patch) | |
tree | cbd8a625268ec290a2d2e03bbad4a94de8678919 /test/Variables | |
parent | e42511a0e12bbd8d74b6dc1136898fea24e791df (diff) | |
download | scons-1573ab84d1cece0367dfd7e804aee39d40f9f849.tar.gz |
replace execfile() by equivalent exec statement
Diffstat (limited to 'test/Variables')
-rw-r--r-- | test/Variables/Variables.py | 2 | ||||
-rw-r--r-- | test/Variables/chdir.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/test/Variables/Variables.py b/test/Variables/Variables.py index eaac22dd..0e6a152c 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 = {} - execfile(file, gdict, ldict) + exec string.replace(open(file).read(), '\r', '\n') 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 711957c3..39eccb3e 100644 --- a/test/Variables/chdir.py +++ b/test/Variables/chdir.py @@ -52,7 +52,8 @@ print "VARIABLE =", repr(env['VARIABLE']) test.write(['bin', 'opts.cfg'], """\ import os os.chdir(os.path.split(__name__)[0]) -execfile('opts2.cfg') +import string +exec(string.replace(open('opts2.cfg').read(), '\\r', '\\n')) """) test.write(['bin', 'opts2.cfg'], """\ |