[TIP] parametrized testing and unittest2.TestCase

Marius Gedminas marius at gedmin.as
Sun Dec 18 03:07:10 PST 2011

On Sun, Dec 18, 2011 at 09:15:18AM +0000, holger krekel wrote:
> On Sat, Dec 17, 2011 at 16:25 +1300, Robert Collins wrote:
> > testscenarios may either inspire or even help you with this.
> Since some time there is a quick port example of testscenarios to py.test:
>     http://pytest.org/latest/example/parametrize.html#a-quick-port-of-testscenarios
> However, the main issue i see with parametrizing tests and dependency injection
> with unittest.TestCase is controling the life-cycle of a resource.
> How can you implement resources (with testscenarios, say) which are
> instantiated once per class or per test-run?

*cue Robert Collins jumping in and exclaiming "testresources"!*

Marius Gedminas
Westheimer's Discovery:
        A couple of months in the laboratory can
        frequently save a couple of hours in the library.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20111218/f1806d5e/attachment.pgp>

More information about the testing-in-python mailing list