[TIP] paramterized or generative tests [was nose2: the nosening]

Jesse Noller jnoller at gmail.com
Thu Aug 5 18:49:15 PDT 2010


On Thu, Aug 5, 2010 at 9:31 PM, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
> On 06/08/2010 02:23, Jesse Noller wrote:
>>
>> [snip...]
>> ps: If nose2/unittest2 could find it in it's shiny new innocent heart
>> to say, have support for test generators; I'd die happy.
>>
>
> Well there's another discussion :-)
>
> It would be very simple to support parameterized tests (of some form), where
> the number of tests can be known at test load time. Supporting generative
> tests - where the tests are generated at *test run time* is uglier.
>
> Would parameterized tests, where the tests are all generated at test load
> time, suffice or do you have a use case for generative tests where the tests
> have to be generated whilst the tests are running and not when the tests are
> loaded?
>
> Michael

For me? To be honest, 98% of my (and the people around me) use cases
are the parameterized case - the test generator syntax is just pure
awesome (Ok, so I really like it) tests generated at run time tends to
rub most people wrong :)

jesse



More information about the testing-in-python mailing list