[Biopython-dev] docstring tests
Bruce Southey
bsouthey at gmail.com
Wed Feb 11 09:34:24 EST 2009
Michiel de Hoon 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:
>
> 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
>
Hi,
I ran the latest CVS version through my Python versions on Linux. All
appear to pass for Python 2.5 (with and without Numpy) and 2.6.
BUT Python 2.4 has an error with docstring tests so it crashes (output
below):
File "run_tests.py", line 263, in runDocTest
module = __import__(name, fromlist=name.split("."))
TypeError: __import__() takes no keyword arguments
There is also one failure with Python 2.3 which does not test docstrings:
======================================================================
ERROR: Test Nexus module
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_Nexus.py", line 92, in test_NexusTest1
self.assertTrue('codons' in n.charpartitions)
AttributeError: 'NexusTest1' object has no attribute 'assertTrue'
----------------------------------------------------------------------
Ran 97 tests in 78.412 seconds
Bruce
[bsouthey at starling biopython]$ python2.4 setup.py test
running test
test_Ace ... ok
test_AlignIO ... ok
test_BioSQL ... skipping. Enter your settings in Tests/setup_BioSQL.py
(not important if you do not plan to use BioSQL).
test_BioSQL_SeqIO ... skipping. Enter your settings in
Tests/setup_BioSQL.py (not important if you do not plan to use BioSQL).
test_CAPS ...
ok
test_Clustalw ...
ok
test_Clustalw_tool ... skipping. Install clustalw or clustalw2 if you
want to use Bio.Clustalw.
test_Cluster ...
ok
test_CodonTable ...
ok
test_CodonUsage ...
ok
test_Compass ...
ok
test_Crystal ...
ok
test_DocSQL ... skipping. Install MySQLdb if you want to use
Bio.DocSQL.
test_EmbossPrimer ...
ok
test_Entrez ...
ok
test_Enzyme ...
ok
test_FSSP ...
ok
test_Fasta ...
ok
test_Fasta2 ...
ok
test_File ...
ok
test_GACrossover ...
ok
test_GAMutation ...
ok
test_GAOrganism ...
ok
test_GAQueens ...
ok
test_GARepair ...
ok
test_GASelection ...
ok
test_GFF ... skipping. Environment is not configured for this test (not
important if you do not plan to use Bio.GFF).
test_GFF2 ... skipping. Install MySQLdb if you want to use
Bio.GFF.
test_GenBank ...
ok
test_GenomeDiagram ... skipping. Install reportlab if you want to use
Bio.Graphics.
test_GraphicsChromosome ... skipping. Install reportlab if you want to
use Bio.Graphics.
test_GraphicsDistribution ... skipping. Install reportlab if you want to
use Bio.Graphics.
test_GraphicsGeneral ... skipping. Install reportlab if you want to use
Bio.Graphics.
test_HMMCasino ...
ok
test_HMMGeneral ...
ok
test_HotRand ...
ok
test_IsoelectricPoint ...
ok
test_KDTree ...
ok
test_KEGG ...
ok
test_KeyWList ...
ok
test_Location ...
ok
test_LocationParser ...
ok
test_LogisticRegression ...
ok
test_MEME ...
ok
test_MarkovModel ...
ok
test_Medline ...
ok
test_Motif ...
ok
test_NCBIStandalone ...
ok
test_NCBIXML ...
ok
test_NCBI_qblast ...
ok
test_NNExclusiveOr ...
ok
test_NNGene ...
ok
test_NNGeneral ...
ok
test_Nexus ...
ok
test_PDB ...
ok
test_ParserSupport ...
ok
test_Pathway ...
ok
test_Phd ...
ok
test_PopGen_FDist ... skipping. Install FDist if you want to use
Bio.PopGen.FDist.
test_PopGen_FDist_nodepend ...
ok
test_PopGen_GenePop ...
ok
test_PopGen_SimCoal ... skipping. Install SIMCOAL2 if you want to use
Bio.PopGen.SimCoal.
test_PopGen_SimCoal_nodepend ...
ok
test_ProtParam ...
ok
test_Restriction ...
ok
test_SCOP_Astral ...
ok
test_SCOP_Cla ...
ok
test_SCOP_Des ...
ok
test_SCOP_Dom ... ok
test_SCOP_Hie ... ok
test_SCOP_Raf ... ok
test_SCOP_Residues ... ok
test_SCOP_Scop ... ok
test_SProt ... ok
test_SVDSuperimposer ... ok
test_SeqIO ... ok
test_SeqIO_online ... ok
test_SeqUtils ... ok
test_SubsMat ... ok
test_UniGene ... ok
test_Wise ... ok
test_align ... ok
test_docstrings ... ok
test_geo ... ok
test_interpro ... ok
test_kNN ... ok
test_lowess ... ok
test_pairwise2 ... ok
test_prodoc ... ok
test_property_manager ... ok
test_prosite ... ok
test_prosite2 ... ok
test_psw ... ok
test_seq ... ok
test_translate ... ok
test_trie ... ok
test_triefind ... ok
Traceback (most recent call last):
File "/home/bsouthey/python/biopython_cvs/biopython/setup.py", line
418, in ?
data_files=DATA_FILES,
File "/usr/local/lib/python2.4/distutils/core.py", line 149, in setup
dist.run_commands()
File "/usr/local/lib/python2.4/distutils/dist.py", line 946, in
run_commands
self.run_command(cmd)
File "/usr/local/lib/python2.4/distutils/dist.py", line 966, in
run_command
cmd_obj.run()
File "/home/bsouthey/python/biopython_cvs/biopython/setup.py", line
212, in run
run_tests.main([])
File "run_tests.py", line 107, in main
runner.run()
File "run_tests.py", line 292, in run
ok = self.runDocTest(test)
File "run_tests.py", line 263, in runDocTest
module = __import__(name, fromlist=name.split("."))
TypeError: __import__() takes no keyword arguments
More information about the Biopython-dev
mailing list