Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: test/preparser/testcfg.py

Issue 7168016: Add duplicate parameter detection to preparser. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update to tip of bleeding_edge Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/preparser/duplicate-property.pyt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/preparser/testcfg.py
diff --git a/test/preparser/testcfg.py b/test/preparser/testcfg.py
index 39b62c396de4c304d5b4c33b60463a45f45d86ab..c534fa1cf507e382ba09ebeab792b4b315643006 100644
--- a/test/preparser/testcfg.py
+++ b/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 = join('obj', 'preparser', mode, 'preparser')
@@ -143,9 +141,9 @@ 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)
+ executable, current_path, mode)
return result
def GetTestStatus(self, sections, defs):
« no previous file with comments | « test/preparser/duplicate-property.pyt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698