[TIP] hackish generative tests (was: Re: Generating tests, II (was: Re: Meta-test methods...))

Doug Philips dgou at mac.com
Sat May 2 11:15:35 PDT 2009


Along time ago (internet time), in a message far far away,
On or about  Tuesday, April 28, 2009, at 07:17AM, holger krekel indited:

>However, I think that instrumenting a test run to invoke tests
>with multiple different parameters or in multiple environments
>is useful and worthwhile.  
>
>So i'd like to phase out (probably making it an 
>optional plugin) yield-mediated generative tests once 
>i implemented a mechanism based on 
>http://codespeak.net/py/trunk/test/funcargs.html 
>that allows to invoke a test function repeatedly 

funcargs is quite interesting.
Are you saying that funcargs (as described at that link) already does repeated invocation? I'm a bit confused since nothing I read there talks about that (or somehow I've missed it).

It seems that funcargs is filling a niche (separation of configuration from testing) in a way different from setUp and tearDown.
Or maybe funcargs is destined to replace/eliminate setUp and tearDown?

The way it is described, funcargs seems a quite clean way to provide additional parameters to test methods.
Running a test method many times with "variations on a theme" seems to be orthogonal.
Interested in hearing more...

-Doug




More information about the testing-in-python mailing list