Mercurial > pydertron
diff test_pydertron.py @ 14:16fe9c63aedb
Added HttpFileSystem
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Thu, 10 Sep 2009 14:27:28 -0700 |
parents | 6c55f09ff31d |
children | f30bd92e2216 |
line wrap: on
line diff
--- a/test_pydertron.py Thu Sep 10 14:07:13 2009 -0700 +++ b/test_pydertron.py Thu Sep 10 14:27:28 2009 -0700 @@ -2,11 +2,11 @@ import sys import pydermonkey -from pydertron import JsSandbox, SandboxedFileSystem, jsexposed +from pydertron import JsSandbox, jsexposed +from pydertron import SandboxedFileSystem, HttpFileSystem -def run_test(name, libpath): - sandbox = JsSandbox(SandboxedFileSystem(libpath)) - +def run_test(name, fs): + sandbox = JsSandbox(fs) stats = {'pass': 0, 'fail': 0, 'info': 0} @jsexposed(name='print') @@ -45,8 +45,12 @@ totals = {'pass': 0, 'fail': 0} + BASE_URL = "http://interoperablejs.googlecode.com/svn/trunk/compliance/" + for libpath, name in dirs: - stats = run_test(name, libpath) + #fs = HttpFileSystem("%s%s/"% (BASE_URL, name)) + fs = SandboxedFileSystem(libpath) + stats = run_test(name, fs) totals['pass'] += stats['pass'] totals['fail'] += stats['fail']