Mercurial > web-gnusto
view run_tests.py @ 40:832c043dfd47
Removed the scrollbar from appearing. This fixes some dynamic layout issues, too, as the client area can no longer change due to a scrollbar appearing.
Unfortunately, while it's still possible to scroll the page using the up/down arrow keys, it's not possible to use the mousewheel. This should be fixable by manually trapping the mousewheel events with e.g. a JQuery mousewheel plugin:
http://www.ogonek.net/mousewheel/jQuery_mousewheel_plugin.js
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Thu, 15 May 2008 02:56:45 -0700 |
parents | 4b6b9ea26552 |
children |
line wrap: on
line source
import glob import os import subprocess JS_CMD = "js" TESTS = glob.glob(os.path.join("tests", "*.js")) OUTPUT_FILE = "test_output.txt" def run_tests(): for test in TESTS: output = open(OUTPUT_FILE, "w") subprocess.call( [JS_CMD, test], stdout = output, stderr = subprocess.STDOUT ) output.close() expected_output_file = "tests/output/%s.txt" % ( os.path.splitext(os.path.basename(test))[0] ) lines = open(OUTPUT_FILE, "r").readlines() expected_lines = open(expected_output_file, "r").readlines() if lines != expected_lines: print 'Test "%s" failed.' % test else: print 'Test "%s" passed.' % test os.remove(OUTPUT_FILE) if __name__ == "__main__": run_tests()