Creating unit tests on the fly

Ben Finney ben+python at benfinney.id.au
Fri Apr 8 18:46:14 EDT 2011


Raymond Hettinger <python at rcn.com> writes:

> I think you're going to need a queue of tests, with your own test
> runner consuming the queue, and your on-the-fly test creator running
> as a producer thread.

I have found the ‘testscenarios’ library very useful for this: bind a
sequence of (name, dict) tuples to the test case class, and each tuple
represents a scenario of data fixtures that will be applied to every
test case function in the class.

    <URL:http://pypi.python.org/pypi/test-scenarios>

You (the OP) will also find the ‘testing-in-python’ discussion forum
<URL:http://lists.idyll.org/listinfo/testing-in-python> useful for this
topic.

-- 
 \       “Never use a long word when there's a commensurate diminutive |
  `\                                    available.” —Stan Kelly-Bootle |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list