Re: [Pyunit-interest] unittest and __init__
Brought to you by:
purcell
From: Frank M. <fm...@qu...> - 2009-10-09 21:26:17
|
At 02:14 PM 10/9/2009, Ori Peleg wrote: >Sure, I've done it with <baseclassname>.__init__ and it worked fine, >but super() should work just as well - class TestCase itself doesn't >use either method, so whatever you choose you won't be in conflict. > >I just checked, and in Python 2.7 they converted to super() (see ><http://svn.python.org/view/python/trunk/Lib/unittest/case.py?view=markup>case.py >and ><http://svn.python.org/view/python/trunk/Lib/unittest/runner.py?view=markup>runner.py), >so you're probably better off using super() instead for future-proofing. Thank you!!!! Frank |