[Biopython-dev] Failure in test_Phylo; `format_branchlength` parameter to NewickIO writers.
Eric Talevich
eric.talevich at gmail.com
Sat Jun 18 19:07:29 UTC 2011
On Fri, Jun 17, 2011 at 1:22 AM, Peter Cock <p.j.a.cock at googlemail.com>wrote:
> On Fri, Jun 17, 2011 at 5:18 AM, Eric Talevich wrote:
> > On Thu, Jun 16, 2011 at 3:15 PM, Peter Cock wrote:
> >>
> >> 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;'
> >>
> >> ----------------------------------------------------------------------
> >>
>
[...]
>
> How about using this, with a comment to explain the variation:
>
> self.assertTrue(memfile.getvalue().lstrip() in ['A:1e-001;', 'A:1e-01;'])
>
> Note we can't use self.assertIn(a, b) since that requires Python 2.7
>
>
Committed:
https://github.com/biopython/biopython/commit/eebf86f863f1d5bfc9a09ab53abf101a4cc8dc79
-Eric
More information about the Biopython-dev
mailing list