Skip to content

Commit

Permalink
support excluding tests via command line
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Behnel committed Aug 22, 2008
1 parent 2da931c commit 7631e5d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions runtests.py
Expand Up @@ -412,6 +412,9 @@ def __call__(self, testname):
parser.add_option("--sys-pyregr", dest="system_pyregr",
action="store_true", default=False,
help="run the regression tests of the CPython installation")
parser.add_option("-x", "--exclude", dest="exclude",
action="append", metavar="PATTERN",
help="exclude tests matching the PATTERN")
parser.add_option("-C", "--coverage", dest="coverage",
action="store_true", default=False,
help="collect source coverage data for the Compiler")
Expand Down Expand Up @@ -476,6 +479,9 @@ def __call__(self, testname):
missing_dep_excluder = MissingDependencyExcluder(EXT_DEP_MODULES)
exclude_selectors = [missing_dep_excluder] # want to pring msg at exit

if options.exclude:
exclude_selectors += [ re.compile(r, re.I|re.U).search for r in options.exclude ]

test_suite = unittest.TestSuite()

if options.unittests:
Expand Down

0 comments on commit 7631e5d

Please sign in to comment.