diff options
author | Guido van Rossum <guido@python.org> | 2013-01-25 09:44:48 -0800 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2013-01-25 09:44:48 -0800 |
commit | 6e3c832af72a7871ab869a6dfb832af53c0c954a (patch) | |
tree | 0521e3a7de31dda0ea7d5992c641dffd85b36a4f /runtests.py | |
parent | 347f4e51b7aa79a33a648da07f434d3636e7434a (diff) | |
parent | cde1a544bc695d668539f782cb13bdb19dd20175 (diff) | |
download | trollius-6e3c832af72a7871ab869a6dfb832af53c0c954a.tar.gz |
Merge
Diffstat (limited to 'runtests.py')
-rw-r--r-- | runtests.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/runtests.py b/runtests.py index d18fe7d..275b23c 100644 --- a/runtests.py +++ b/runtests.py @@ -15,6 +15,7 @@ e.g. 'tulip.events_test.PolicyTests.testPolicy'. # Originally written by Beech Horn (for NDB). +import logging import os import re import sys @@ -74,6 +75,17 @@ def main(): elif arg and not arg.startswith('-'): patterns.append(arg) tests = load_tests(includes, excludes) + logger = logging.getLogger() + if v == 0: + logger.setLevel(logging.CRITICAL) + elif v == 1: + logger.setLevel(logging.ERROR) + elif v == 2: + logger.setLevel(logging.WARNING) + elif v == 3: + logger.setLevel(logging.INFO) + elif v >= 4: + logger.setLevel(logging.DEBUG) result = unittest.TextTestRunner(verbosity=v).run(tests) sys.exit(not result.wasSuccessful()) |