Permalink
Browse files

create a dummy "load" function instead of stripping the load call fro…

…m tests because the way load was being stripped wasn't resilient to future changes to output
  • Loading branch information...
1 parent 067059d commit 4f5b92d9f4799f3c655aa1b4a43a7607c3ce4718 @thenewguy committed Jul 19, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 run_tests.py
View
@@ -291,6 +291,7 @@ def main():
write_to_qunit(fp, 'test("%s", function() {' % suite.templ["js_path"].replace("\\", "/"))
write_to_qunit(fp, 'var output = [];', 1)
+ write_to_qunit(fp, 'function load(x) {};', 1)
write_to_qunit(fp, "var console = {};", 1)
write_to_qunit(fp, "console.log = function() {", 1)
write_to_qunit(fp, "var inputs = [];", 2)
@@ -302,8 +303,6 @@ def main():
write_to_qunit(fp, builtins, 1)
with open(py_js_path, "rb") as py_js:
content = py_js.read().splitlines()
- if content:
- del content[0]# remove 'load("py-builtins.js");'
write_to_qunit(fp, content, 1)
if getattr(suite, "imports", None):
for imp in suite.imports:

1 comment on commit 4f5b92d

Good idea, this is a better way to do it.

Please sign in to comment.