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

Rob Guttman robguttman at gmail.com
Thu Aug 5 19:08:04 PDT 2010

My use case for parameterized tests is module load/import time only.

Yield-style test generation is limited for my needs and I also sometimes
find those tests hard to understand.  So I wrote my own test framework about
a year or so ago that instead uses a decorator and auto-tags tests with each
param and value (so they can be individually selected via nose's attrib
plugin).  Tests get permuted across all combinations of parameters; new
tests get created and added to the test class on module import.  I would
love to find the right home/package for this work assuming others may find
it useful although it needs a bit more love for it to be shareable.
Ideas/suggestions welcome.

- Rob

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
>  _______________________________________________
>> testing-in-python mailing list
>> testing-in-python at lists.idyll.org
>> http://lists.idyll.org/listinfo/testing-in-python
> --
> http://www.ironpythoninaction.com/
> http://www.voidspace.org.uk/blog
> READ CAREFULLY. By accepting and reading this email you agree, on behalf of
> your employer, to release me from all obligations and waivers arising from
> any and all NON-NEGOTIATED agreements, licenses, terms-of-service,
> shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure,
> non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have
> entered into with your employer, its partners, licensors, agents and
> assigns, in perpetuity, without prejudice to my ongoing rights and
> privileges. You further represent that you have the authority to release me
> from any BOGUS AGREEMENTS on behalf of your employer.
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20100805/2d89e89c/attachment.htm>

More information about the testing-in-python mailing list