[issue12231] regrtest: add -k and -K options to filter tests by function/file names

Ezio Melotti report at bugs.python.org
Wed Jun 1 13:15:51 CEST 2011


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

IMHO it would be better to tweak regrtest so that it understand test_file.TestClass.test_method, possibly supporting wildcards.
E.g.:
  - ./python -m test test_subprocess.POSIXProcessTestCase
  - ./python -m test test_subprocess.POSIXProcessTestCase.test_pass_fds
  - ./python -m test '*codecencoding*'
  - ./python -m test 'test_subprocess.C*'

The -x/--exclude option could be extended to support this notation too and make possible to exclude specific tests classes/methods.
Wildcards are less flexible than regex, but I think they are good enough for our use case and simpler to use.

----------
nosy: +ezio.melotti
stage:  -> needs patch
type:  -> feature request
versions:  -Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12231>
_______________________________________


More information about the Python-bugs-list mailing list