[TIP] Functions for tests instead of classes

Michael Foord fuzzyman at voidspace.org.uk
Mon Mar 15 10:59:11 PDT 2010

On 15/03/2010 17:46, Pekka Klärck wrote:
> [snip...]
>> Then, to retain compatibility with older versions of unittest, the TestCase
>> object can contain a bunch of trivial methods like:
>>    def assertEqual(self, a, b) :
>>       return assertEqual(a,b)
> Yep, keeping backwards compatibility would be trivial. Are there any
> good reasons not to do this?

Per TestCase failureException is one reason.


> Cheers,
>      .peke


READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

More information about the testing-in-python mailing list