[Biopython-dev] Unit tests for deprecated modules?

Peter biopython at maubp.freeserve.co.uk
Sat Aug 8 19:41:20 UTC 2009


Last year we talked about what to do with the unit tests for deprecated modules,
http://lists.open-bio.org/pipermail/biopython-dev/2008-August/004137.html

On Tue, Aug 19, 2008, Peter wrote:
> Are there any strong views about when to remove unit tests for
> deprecated modules?  I can see two main approaches:
>
> (a) Remove the unit test when the code is deprecated, as this avoids
> warning messages from the test suite.
> (b) Remove the unit test only when the deprecated code is actually
> removed, as continuing to test the code will catch any unexpected
> breakage of the deprecated code.
>
> I lean towards (b), but wondered what other people think.
>
> Peter

On Tue, Aug 19, 2008, Michiel de Hoon wrote:
> I would say (a). In my opinion, deprecated means that the module
> is in essence no longer part of Biopython; we just keep it around
> to give people time to change. Also, deprecation warnings distract
> from real warnings and errors in the unit tests, are likely to confuse
> users, and give the impression that Biopython is not clean. I don't
> remember a case where we had to resurrect a deprecated module,
> so we may as well remove the unit test right away.
>
> --Michiel

On Tue, Aug 19, 2008, Frank Kauff wrote:
> I favor option a. Deprecated modules are no longer under development,
> so there's not much need for a unit test. A failed test would probably
> not trigger any action anyway, because nobody's going to do much
> bugfixing in deprecated modules.
>
> Frank

So, what we agreed last year was to remove tests for deprecated
modules. This issue has come up again with the deprecation of
Bio.Fasta, and the question of what to do with test_Fasta.py

I'd like to suggest a third option: Keep the tests for deprecated
modules, but silence the deprecation warning. e.g. make can
test_Fasta.py silence the Bio.Fasta deprecation warning. Hiding
the warning would prevent the likely user confusion on running
the test suite (an issue Michiel pointed out last year). Keeping
the test will prevent us accidentally breaking Bio.Fasta during
the phasing out period.

Any thoughts?

Peter



More information about the Biopython-dev mailing list