[Biopython-dev] test_PhyloXML.py failing on Windows

Eric Talevich eric.talevich at gmail.com
Wed Feb 24 17:03:31 UTC 2010


On Wed, Feb 24, 2010 at 7:37 AM, Peter <biopython at maubp.freeserve.co.uk>wrote:

> Hi Eric,
>
> Do you have access to a Windows machine for testing? There
> seem to be two issues in the PhyloXML tests (tested on
> Python 2.5, 2.6 and 2.7a1 on Windows XP):
>

I'll have access to Windows XP this weekend, but I think I can probably fix
these tests before then.

======================================================================
> FAIL: Count and confirm the number of tags in each example XML file.
> ----------------------------------------------------------------------
>

This was an early sanity check for parsing XML with ElementTree, and while I
don't see a good reason for the number of lines to be different between OSes
(line endings?), the test isn't Biopython-specific anyway. I'll just delete
it.

======================================================================
> ERROR: Round-trip parsing and serialization of apaf.xml.
> ----------------------------------------------------------------------
>

Apparently Windows doesn't like renaming a file to replace another existing
file. To fix this error asap I'll call os.remove before the rename, but
you're right that these tests should be rewritten to use named temp files or
StringIO. (I needed to trick unittest into re-running the parser tests on
re-written files and this sufficed last summer)

-Eric



More information about the Biopython-dev mailing list