[Biopython-dev] Unit tests for deprecated modules?
Peter
biopython at maubp.freeserve.co.uk
Sat Aug 8 15:50:47 EDT 2009
On Sat, Aug 8, 2009 at 8:41 PM, Peter<biopython at maubp.freeserve.co.uk> wrote:
> 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
> ...
> I'd like to suggest a third option: Keep the tests for deprecated
> modules, but silence the deprecation warning. e.g. make
> test_Fasta.py silence the Bio.Fasta deprecation warning.
I've done that in CVS as a proof of principle, replacing:
from Bio import Fasta
with:
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
from Bio import Fasta
warnings.resetwarnings()
There may be a more elegant way to do this, but it works.
Peter
More information about the Biopython-dev
mailing list