[Biopython-dev] docstring tests

Giovanni Marco Dall'Olio dalloliogm at gmail.com
Wed Feb 11 09:16:29 UTC 2009


On Wed, Feb 11, 2009 at 2:06 AM, Michiel de Hoon <mjldehoon at yahoo.com> wrote:
> Hi everybody,
>
> I included the code to run the docstring tests to run_tests.py, which means that now they're run after the test_*.py tests have finished:

thanks
As for the doctests, it would be really be useful to define some
global fixtures.
It will reduce the docstrings lengths and we won't have to repeat all
the examples in every method of every function, we won't have to
repeat the 'from Bio import ..' in every test and so on.
How this could be implemented in this test framework?

>
> test_seq ... ok
> test_translate ... ok
> test_trie ... ok
> test_triefind ... ok
> Bio.Seq docstring test ... ok
> Bio.SeqRecord docstring test ... ok
> Bio.SeqIO docstring test ... ok
> Bio.Align.Generic docstring test ... ok
> Bio.AlignIO docstring test ... ok
> Bio.KEGG.Compound docstring test ... ok
> Bio.KEGG.Enzyme docstring test ... ok
> Bio.Wise docstring test ... ok
> Bio.Wise.psw docstring test ... ok
> Bio.Statistics.lowess docstring test ... ok
> ----------------------------------------------------------------------
> Ran 107 tests in 97.191 seconds
>
>
> Previously, this code was in test_docstrings.py, but it's easier to do this from run_tests.py because doctest can create a unittest-style test suite directly. This also means that if your module contains docstring tests, you should include the module name to DOCTEST_MODULES near the top of run_tests.py (instead of to test_docstrings.py).
>
> I've uploaded the new run_tests.py to CVS so people can try it, but we can revert to the previous version of run_tests.py if preferred. If there are no issues with this approach, we can remove test_docstrings.py.
>
> --Michiel.
>
>
>
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython-dev
>



-- 

My blog on bioinformatics (now in English): http://bioinfoblog.it




More information about the Biopython-dev mailing list