Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: run_tests.py

Issue 4911523189227520: Issue 510 - [Typed objects] Don't hardcode script load order in unit tests (Closed)
Patch Set: Created May 17, 2014, 9:32 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/common.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: run_tests.py
===================================================================
--- a/run_tests.py
+++ b/run_tests.py
@@ -33,17 +33,17 @@ def multiplex(path=""):
request_path = request_url.path
if request_path.startswith("/lib/"):
path = flask.safe_join(os.path.dirname(__file__), request_path.lstrip("/"))
if not os.path.isfile(path):
return flask.abort(404)
with open(path, "rb") as file:
module = os.path.splitext(request_path[len("/lib/"):])[0]
- data = "require.scopes['%s'] = function(){exports={};%s\nreturn exports;}();" % (module, file.read())
+ data = "require.scopes['%s'] = function(){var exports={};%s\nreturn exports;}();" % (module, file.read())
return (data, 200, {"Content-Type": "application/javascript; charset=utf-8"})
else:
if request_path.endswith("/"):
request_path += "index.html"
return flask.send_from_directory(os.path.join(os.path.dirname(__file__), "test"), request_path.lstrip("/"))
if __name__ == "__main__":
app.run(debug=True)
« no previous file with comments | « no previous file | test/common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld