[Tutor] unit testing [how to contribute to Python's codebase]

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Sun Jun 1 03:33:01 2003


> > >Hmm- there's something interesting.  Maybe I could hack unittest
> > >so that it takes a list of modules to run.  ...or maybe that's
> > >what that 'argv' parameter is for.  Hmm, maybe I can do it just
> > >by passing my 'tests' list in as argv.
> >
> > Please tell us what you found. Separate namespaces are probably
> > enough protection, even if separate processes feel *very* safe...
>
> Well, unittest.main can optionally take a module name, so it shouldn't
> be too tough to make it take a list of modules.  Who do I talk to about
> permission to do this and fold it back in to the main Python codebase?

Hi Tom,

One way to do this is to write a small patch to unittest.py, and send it
off as a feature request in Python's sourceforge page:

    http://sourceforge.net/tracker/?group_id=5470&atid=305470

Once a patch gets submitted, the core developers can take a look and can
see if it can be integrated; they're usually pretty fast about it.

Talking about it on comp.lang.python might also be helpful, as it might
spur interest from other folks.  If an idea becomes popular there, you
have a better chance of getting it in.  *grin*

For more details about how we can contribute to Python, we can look at:

    http://www.python.org/dev/

Best of wishes!