[javascriptlint-commit] SF.net SVN: javascriptlint: [185] trunk/jsl.py
Status: Beta
Brought to you by:
matthiasmiller
From: <mat...@us...> - 2008-04-01 01:54:12
|
Revision: 185 http://javascriptlint.svn.sourceforge.net/javascriptlint/?rev=185&view=rev Author: matthiasmiller Date: 2008-03-31 18:54:10 -0700 (Mon, 31 Mar 2008) Log Message: ----------- Stop using unittest.main to run unit tests and respect --quiet and --verbose. Modified Paths: -------------- trunk/jsl.py Modified: trunk/jsl.py =================================================================== --- trunk/jsl.py 2008-03-31 23:47:13 UTC (rev 184) +++ trunk/jsl.py 2008-04-01 01:54:10 UTC (rev 185) @@ -108,6 +108,11 @@ help="dump this script") add("--unittest", dest="unittest", action="store_true", default=False, help="run the python unittests") + add("--quiet", dest="verbosity", action="store_const", const=0, + help="minimal output") + add("--verbose", dest="verbosity", action="store_const", const=2, + help="verbose output") + parser.set_defaults(verbosity=1) options, args = parser.parse_args() if len(sys.argv) == 1: @@ -123,7 +128,8 @@ profile_func = profile_enabled if options.unittest: - unittest.main(pyjsl.jsparse, argv=[sys.argv[0]]) + runner = unittest.TextTestRunner(verbosity=options.verbosity) + runner.run(unittest.findTestCases(pyjsl.jsparse)) if options.test: profile_func(run_tests) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |