aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/test/preparser/testcfg.py
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/preparser/testcfg.py')
-rw-r--r--deps/v8/test/preparser/testcfg.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/deps/v8/test/preparser/testcfg.py b/deps/v8/test/preparser/testcfg.py
index d900e2696f..88c06a31ad 100644
--- a/deps/v8/test/preparser/testcfg.py
+++ b/deps/v8/test/preparser/testcfg.py
@@ -98,7 +98,6 @@ class PreparserTestConfiguration(test.TestConfiguration):
def ParsePythonTestTemplates(self, result, filename,
executable, current_path, mode):
pathname = join(self.root, filename + ".pyt")
- source = open(pathname).read();
def Test(name, source, expectation):
throws = None
if (expectation is not None):
@@ -118,8 +117,7 @@ class PreparserTestConfiguration(test.TestConfiguration):
testsource = testsource.replace("$"+key, replacement[key]);
Test(testname, testsource, expectation)
return MkTest
- eval(compile(source, pathname, "exec"),
- {"Test": Test, "Template": Template}, {})
+ execfile(pathname, {"Test": Test, "Template": Template})
def ListTests(self, current_path, path, mode, variant_flags):
executable = 'preparser'
@@ -148,7 +146,7 @@ class PreparserTestConfiguration(test.TestConfiguration):
filenames.sort()
for file in filenames:
# Each file as a python source file to be executed in a specially
- # perparsed environment (defining the Template and Test functions)
+ # created environment (defining the Template and Test functions)
self.ParsePythonTestTemplates(result, file,
executable, current_path, mode)
return result