[Biopython-dev] Failure in test_Phylo; `format_branchlength` parameter to NewickIO writers.

Eric Talevich eric.talevich at gmail.com
Fri Jun 17 04:18:03 UTC 2011


On Thu, Jun 16, 2011 at 3:15 PM, Peter Cock <p.j.a.cock at googlemail.com>wrote:

> Hi all,
>
> Looking at the Python 2.5 on Windows buildbot, there is a recent failure:
> http://testing.open-bio.org:8010/builders/Windows%20XP%20-%20Python%202.5
>
> ======================================================================
> FAIL: Custom format string for Newick branch length serialization.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "c:\repositories\BuildBot\win25\build\Tests\test_Phylo.py",
> line 52, in test_format_branch_length
>    self.assertEqual(mem_file.getvalue().strip(), 'A:1e-01;')
> AssertionError: 'A:1e-001;' != 'A:1e-01;'
>
> ----------------------------------------------------------------------
>
>
Urgh. This is only occurring on Windows in Py2.5, not on 2.6? I suppose
these platform-specific differences have been ironed out over time in
Python.

To make the test work on Win+Py2.5, which of these do you prefer?

(a) change the test to
assert_(memfile.getvalue().lstrip().startswith('A:1e-'))

(b) Test for the Python version, and if less than 2.6, do the same test as
(a), but also include an angry note about Windows compatibility in earlier
Python versions.

Thanks for spotting this,
Eric



More information about the Biopython-dev mailing list