diff options
Diffstat (limited to 'test/Variables/Variables.py')
-rw-r--r-- | test/Variables/Variables.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Variables/Variables.py b/test/Variables/Variables.py index 0fe3745..09a17d5 100644 --- a/test/Variables/Variables.py +++ b/test/Variables/Variables.py @@ -231,7 +231,9 @@ opts.Save('variables.saved', env) def checkSave(file, expected): gdict = {} ldict = {} - exec(open(file, 'r').read(), gdict, ldict) + with open(file, 'r') as f: + contents = f.read() + exec(contents, gdict, ldict) assert expected == ldict, "%s\n...not equal to...\n%s" % (expected, ldict) # First test with no command line variables |