[issue8911] regrtest.main should have a test skipping argument

Jerry Seutter report at bugs.python.org
Wed Jul 28 21:13:00 CEST 2010


Jerry Seutter <jseutter at gmail.com> added the comment:

Hi Brett (and others)

I'm thinking of making the following changes:

1. In Lib/test/regrtest.py, move command line parsing out of main() into a function called parse_command_line()

2. parse_command_line() will parse command line settings and store them in a dictionary that can be passed in as **kwargs to main().

3. The "exclude" parameter that main takes in will be modified to take a list.  This list contains a list of tests to be skipped.

4. Update importlib/test/regrtest.py to call main() without doing sys.argv[] hacking.

5. The command line interface will remain unchanged.  If regrtest.py is called without the --exclude flag, the tests supplied on the command line will be interpreted as the tests to run.  If --exclude is supplied, the tests on the command line will be interpreted as the tests to _not_ run.

6. Switch regrtest.py to use argparse instead of optparse.

Do these look reasonable?

----------

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


More information about the Python-bugs-list mailing list