[Biopython-dev] Running Biopython tests on windows xp
Peter
biopython at maubp.freeserve.co.uk
Wed Jan 14 23:27:27 UTC 2009
On Wed, Jan 14, 2009 at 10:48 PM, Bruce Southey <bsouthey at gmail.com> wrote:
> Using IDLE, 'from Bio.Restriction import *' works correctly.
>
> These ones are failures to find the correct biopython installation. Both
> 'python setup.py test' and 'python run_tests.py' are assuming that I have
> built from source and everything is in the local directory. But that
> assumption is wrong since I used the Biopython binary installer so
> technically the tests I run are invalid.
I think I understand what's going on now. All these failures are
essentially due to the unusual and unexpected setup on your machine
(or for the SCOP tests, the line endings). You still didn't explain
how/where you installed the test scripts etc, but what I think is
happening is the following:
You're official installation (including the compiled C code) create
using the Windows Installer is in one place, say under
C:\XXX\site-packages for the sake of discussion.
You've unpacked the source code in another location, and are trying to
run the test suite there. This set of files will NOT have the
compiled C code - and thus running some of the tests via run_tests.py
will fail. If you run individual test_XXX.py files this should use
the system installed files under C:\XXX\site-packages and so the test
should work.
It would be a bit of a hack, but you can probably overcome this by
manually copying the installed compiled modules from
C:\XXX\site-packages into the unpacked source code (under a suitably
named build sub directory), or moving the Test suite next to the
installed code.
Alternatively, you could try editing run_tests.py to comment out the
path "magic" so that is just uses the system installation of Biopython
(rather than trying to use the local copy it expects you to have just
built from source), i.e. try commenting out these two lines in
run_tests.py found near the start of the main function:
sys.path.insert(1, source_path)
sys.path.insert(1, build_path)
However, I'm no longer surprised that the C code tests are failing,
and don't think this is a bug per se.
> For the SCOP tests, this is as you say, a 'end of line' issue between
> windows and Linux. I opened 'and dir.cla.scop.txt_test' with wordpad and
> saved it with a new name. The line from testIndex in test_SCOP_Cla.py that
> gave the error index['d4hbia_'] works with the new file but not the old
> file.
Good to confirm that. If you spot an easy cross platform fix so that
the SCOP code can cope with either line ending that would be good, but
I didn't consider this worth sending much time on.
> I also installed reportlab and biosql and these pass the tests (except for
> the mysql warning with Biosql that Peter reported).
Good. Out of interest, which BioSQL warning are you talking about?
Peter
More information about the Biopython-dev
mailing list