[TIP] Test Parameterization with unittest

Doug Philips dgou at mac.com
Tue May 12 15:11:57 PDT 2009

On or about Tuesday, May 12, 2009, at 06:07PM, Robert Collins indited:
>On Tue, 2009-05-12 at 11:00 -0400, Doug Philips wrote:
>> Yes, when you put it that way, I agree. Magical attributes <shudder>.
>No worse than calling a helper which sets attributes for you. Like, I
>dunno, 'setUp'.

Yes and no. setUp is a nice "typical" common code refactoring receptacle.
But, I do agree. I much prefer the functional-programming-style of funcargs.
TestCase classes are really just name spaces for related tests that want to share common setUp/tearDown functionality. At least from a certain point of view. :)


More information about the testing-in-python mailing list