From: Stefan Behnel Date: Sun, 25 May 2008 13:49:59 +0000 (+0200) Subject: require options '-v' or '-vv' for status output in test runner X-Git-Tag: 0.9.8rc1~11^2~10^2~15^2~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fc3249dc9aa22427d46314904eee51b4fc31fe9c;p=cython.git require options '-v' or '-vv' for status output in test runner --- 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()