From fc3249dc9aa22427d46314904eee51b4fc31fe9c Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 25 May 2008 15:49:59 +0200 Subject: [PATCH] require options '-v' or '-vv' for status output in test runner --- runtests.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/runtests.py b/runtests.py index fa7c7310..c4216ef4 100644 --- a/runtests.py +++ b/runtests.py @@ -282,6 +282,18 @@ if __name__ == '__main__': else: annotate_source = True + try: + sys.argv.remove("-vv") + except ValueError: + try: + sys.argv.remove("-v") + except ValueError: + verbosity = 0 + else: + verbosity = 1 + else: + verbosity = 2 + import re selectors = [ re.compile(r, re.I|re.U).search for r in sys.argv[1:] ] if not selectors: @@ -293,7 +305,7 @@ if __name__ == '__main__': if coverage is not None: coverage.start() - unittest.TextTestRunner(verbosity=2).run(test_suite) + unittest.TextTestRunner(verbosity=verbosity).run(test_suite) if coverage is not None: coverage.stop() -- 2.26.2