Changeset 136

Show
Ignore:
Timestamp:
Tue Dec 5 15:48:27 2006
Author:
jpellerin
Message:

Added option to configure testMatch regular expression (#101)

Files:

Legend:

Unmodified
Added
Removed
Modified
  • trunk/nose/core.py

    r124 r136  
    265 265                       help="Also run tests that match regular "  
    266 266                       "expression [NOSE_INCLUDE]")  
      267     parser.add_option("-m", "--match", "--testmatch", action="store",  
      268                       dest="test_match", help="Use this regular expression to "  
      269                       "find tests [NOSE_TESTMATCH]",  
      270                       default=env.get('NOSE_TESTMATCH'))  
    267 271     parser.add_option("-s", "--nocapture", action="store_false",  
    268 272                       default=not env.get('NOSE_NOCAPTURE'), dest="capture",  
     
    398 402         conf.exclude = map(re.compile, tolist(options.exclude))  
    399 403         log.info("Excluding tests matching %s", options.exclude)  
      404  
      405     if options.test_match:  
      406         conf.testMatch = re.compile(options.test_match)  
      407         log.info("Test match regular expression: %s", options.test_match)  
    400 408          
    401 409     if conf.capture: