From 5da7e1377692d53c675ee9f21ef7d8019d6ae856 Mon Sep 17 00:00:00 2001 From: Joe Gregorio Date: Fri, 20 Oct 2006 13:58:36 -0400 Subject: [PATCH] Added --quiet, -q, -v and --verbose command-line options to running tests. --- runtests.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/runtests.py b/runtests.py index 1e866cb..d14058d 100755 --- a/runtests.py +++ b/runtests.py @@ -33,5 +33,11 @@ except Exception, exception: for module in modules: __import__(module) raise +verbosity = 1 +if "-q" in sys.argv or '--quiet' in sys.argv: + verbosity = 0 +if "-v" in sys.argv or '--verbose' in sys.argv: + verbosity = 2 + # run test suite -unittest.TextTestRunner().run(suite) +unittest.TextTestRunner(verbosity=verbosity).run(suite)