[TIP] Functions for tests instead of classes
Pekka Klärck
peke at iki.fi
Mon Mar 15 11:42:14 PDT 2010
2010/3/15 Michael Foord <fuzzyman at voidspace.org.uk>:
> 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.
How, and how often, is this functionality actually used? Would you be
OK with the change if there was a way to keep it? Or could we simple
have asserts in a separate module and not touch TestCase at all?
Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org
More information about the testing-in-python
mailing list