diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-06-27 14:57:12 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-06-27 14:57:12 +0200 |
commit | 8deb097acfbc2f8f61144f78be5a0920dd85ba30 (patch) | |
tree | d09826ade39f33b2a059e91cdd52bd3c8df28687 | |
parent | 91de8adf448f9803e46b1bc006029127243fec27 (diff) | |
download | trollius-8deb097acfbc2f8f61144f78be5a0920dd85ba30.tar.gz |
fix runtests.py command line
-rwxr-xr-x | runtests.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/runtests.py b/runtests.py index e3edd82..b07b742 100755 --- a/runtests.py +++ b/runtests.py @@ -48,7 +48,7 @@ except ImportError: import unittest2 as unittest from unittest2.signals import installHandler -ARGS = optparse.OptionParser(description="Run all unittests.", usage="%prog") +ARGS = optparse.OptionParser(description="Run all unittests.", usage="%prog [options] [pattern] [pattern2 ...]") ARGS.add_option( '-v', '--verbose', action="store_true", dest='verbose', default=0, help='verbose') @@ -80,9 +80,6 @@ ARGS.add_option( ARGS.add_option( '--coverage', action="store_true", dest='coverage', help='enable html coverage report') -ARGS.add_option( - '--pattern', action="append", - help='optional regex patterns to match test ids (default all tests)') if PY33: @@ -222,7 +219,7 @@ class TestRunner(unittest.TextTestRunner): def runtests(): - args, commands = ARGS.parse_args() + args, pattern = ARGS.parse_args() if args.coverage and coverage is None: URL = "bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py" @@ -248,9 +245,9 @@ def runtests(): excludes = includes = [] if args.exclude: - excludes = args.pattern + excludes = pattern else: - includes = args.pattern + includes = pattern v = 0 if args.quiet else args.verbose + 1 failfast = args.failfast |