[Biopython-dev] docstring tests

Bruce Southey bsouthey at gmail.com
Wed Feb 11 16:10:41 UTC 2009


Peter wrote:
> On Wed, Feb 11, 2009 at 3:16 PM, Bruce Southey <bsouthey at gmail.com> wrote:
>   
>>> That is because the unittest assertTrue is only available on python
>>> 2.4+, so we should add a quick workaround with a note that this can be
>>> simplified once we drop Python 2.3 support.
>>>       
>> I think these (as there are more than one) should be using failUnless
>> instead:
>> self.failUnless('codons' in n.charpartitions)
>>     
>
> Actually, from further reading, I think we should really be using
> assert_ (it would have been called assert, but this is a reserved
> word, so add a trailing underscore as per PEP8).  The variants
> assertTrue and assertFalse were added to match JUnit.  See:
> http://bugs.python.org/issue2249
>
> Fixed in CVS to use assert_ instead of assertTrue.
>
> Peter
>   
Okay
The tests pass or skipped the tests that require Python 2.4+ for 
Python2.3 with the final message as expected :
'Docstring tests require Python 2.4 or later; skipping'

Thanks
Bruce




More information about the Biopython-dev mailing list