[Biopython-dev] docstring tests

Peter biopython at maubp.freeserve.co.uk
Wed Feb 11 15:52:05 UTC 2009


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



More information about the Biopython-dev mailing list