Unit-testing single function with large number of different inputs
Edvard Majakari
edvard+news at majakari.net
Wed Feb 18 08:54:39 EST 2004
Peter Otten <__peter__ at web.de> writes:
> I think dynamically creating test cases is the way to go. I would subclass
> TestCase to test one file and then for every file put an instance of
> MyTestCase into a TestSuite. For instance:
[snip]
Right!
What a nice solution - now I have good sides of my former and latter
solutions, and none of the bad sides (with the probable exception of
testing code being harder to read for others :)
Thank you.
--
# Edvard Majakari Software Engineer
# PGP PUBLIC KEY available Soli Deo Gloria!
$_ = '456476617264204d616a616b6172692c20612043687269737469616e20'; print
join('',map{chr hex}(split/(\w{2})/)),uc substr(crypt(60281449,'es'),2,4),"\n";
More information about the Python-list
mailing list