[Biopython-dev] Running Biopython tests on windows xp

Peter biopython at maubp.freeserve.co.uk
Wed Jan 14 21:43:33 UTC 2009

On Wed, Jan 14, 2009 at 8:24 PM, Bruce Southey <bsouthey at gmail.com> wrote:
> Hi,
> I decided to install windows on a virtual system part to have a windows test
> system.  I installed Python 2.5, numpy 1.2 and biopython 1.49 using binary
> installers. I am aiming to get add the optional software like Reportlab and
> a C compiler.

If you are installing Biopython using our Windows Installer then you
shouldn't need a C compiler.

If you would like to install from source, then yes, you will need a C
compiler.  You can either try the appropriate MS compiler for your
version of python, or we suggest Mingw32 from cygwin.

> Is there a way to run the Biopython tests within Python rather than using
> the system command line?

Not really - why do you want to?  I suppose you could use python to
invoke the command "python run_tests.py".

> When I run the tests from the command like I get a number a failures that I
> think are due to a lack of a C compiler.
> Are these expected or do you want bug reports?

These are not expected.  The whole test suite passes for me on Windows
where I have installed Biopython from source.

So you installed Biopython using our Window Installer - how did you
get the unit tests?  I'm pretty sure the SCOP failures are due to the
files under Tests\SCOP having Unix line endings instead of Windows
line endings (we're fixed some similar issues in the past).  Note that
both the source code archives as *.zip and *.tar.gz use Unix line
endings internally, but if you used CVS it should have got them with
Windows line endings for you.

However, most of your test failures do seem to be related to C code in
some way.  I wonder if this is linked to the virtual environment?  I
should be able to try the Biopython 1.49 installer with Python 2.5 on
a Windows machine myself to check that...

The list of failures:
> test_CAPS ... ERROR
> test_Cluster ... FAIL
> test_KDTree ... ERROR
> test_PDB ... ERROR
> test_Restriction ... ERROR
> test_SCOP_Cla ... FAIL
> test_SCOP_Raf ... FAIL
> test_trie ... ERROR
> test_triefind ... ERROR

And some comments on the messages:

> ERROR: test_CAPS
> ...
>   from Bio.Restriction.DNAUtils import complement
> ImportError: No module named DNAUtils

Strange.  Note Bio.Restriction.DNAUtils is a C module.

> ERROR: test_KDTree
> ...
>   from Bio.KDTree import _CKDTree
> ImportError: cannot import name _CKDTree

Again, Bio.KDTree. _CKDTree is a C module

> ERROR: test_PDB
> ...
>   from Bio.KDTree import _CKDTree
> ImportError: cannot import name _CKDTree

Same failure as test_KDTree

> ERROR: test_Restriction
> ...
>   from Bio.Restriction import RanaConfig as RanaConf
> ImportError: cannot import name RanaConfig

Odd.  RanaConfig is a pure python module, and pretty short too.

> ERROR: test_trie
> ...
>   from Bio import trie
> ImportError: cannot import name trie

Bio.trie is another C module

> ERROR: test_triefind
> ...
>   from Bio import trie
> ImportError: cannot import name trie

Same error as test_trie above.

> FAIL: test_Cluster
> ...
> Output  : 'test_clusterdistance (test_Cluster.TestCluster) ... ERROR\n'
> Expected: 'test_clusterdistance (test_Cluster.TestCluster) ... ok\n'

Could you run this test directly (python test_Cluster.py) which should
give a more helpful message.  But again, this module does include some
C code....

> FAIL: test_SCOP_Cla
> ...
> Output  : 'testIndex (test_SCOP_Cla.ClaTests) ... ERROR\n'
> Expected: 'testIndex (test_SCOP_Cla.ClaTests) ... ok\n'

I think this is just a new line issue.

> FAIL: test_SCOP_Raf
> ...
> Output  : 'testSeqMapIndex (test_SCOP_Raf.RafTests) ... ERROR\n'
> Expected: 'testSeqMapIndex (test_SCOP_Raf.RafTests) ... ok\n'

I think this is just a new line issue.


More information about the Biopython-dev mailing list