[TIP] dynamically create tests with unittest

Matěj Cepl mcepl at redhat.com
Thu Feb 26 06:43:44 PST 2015

On 25/02/15 23:19, Albert-Jan Roskam wrote:
> This could hardly be more elegant. What is the preferred way to do this with unittest? I have seen a few solutions, e.g.:
> http://stackoverflow.com/questions/2798956/python-unittest-generate-multiple-tests-programmatically/2799009#2799009

Yes, I used code based on this answer in yamlish ... see

http://www.ceplovi.cz/matej/, Jabber: mcepl at ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC

Extremism in the defense of liberty is no vice; moderation in
the pursuit of justice is no virtue.
    -- Barry Goldwater (actually written by Karl Hess)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: OpenPGP digital signature
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20150226/a5619984/attachment.pgp>

More information about the testing-in-python mailing list