[Biopython-dev] test_PopGen_GenePop_EasyController.py failure on Jython
Tiago Antão
tiagoantao at gmail.com
Wed Nov 10 08:05:59 EST 2010
I know, this might be an issue with the jython version (being just a
release candidate). I am going to wait for results on 2.5.1 and
compare. Or I might just install it myself and see.
Is there any reason for the unittest framework to ignore OSErrors? I
am getting some OSErrors (just in jython 2.5.2) and they are being
ignored (but reported as warnings)...
Tiago
2010/11/10 Peter <biopython at maubp.freeserve.co.uk>:
> Hi Taigo,
>
> From your buildbot log for Jython 2.5.2 (release candidate 2), and
> also my Mac OS
> Jython 2.5.1 install, we have a PopGen failure:
>
> ======================================================================
> FAIL: Test get alleles.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/home/tantao/test/slave/jython252lin/build/Tests/test_PopGen_GenePop_EasyController.py",
> line 57, in test_get_alleles
> self.assertEqual(self.ctrl.get_alleles(0,"Locus3"), [3, 20])
> AssertionError: [20, 3] != [3, 20]
>
> Notice that by using the unittest assertEqual method we get to see the
> values compared:
> https://github.com/biopython/biopython/commit/06a719be51ecd207b781224d3f57bb5ebb07198a
>
> Before the change the output was like this:
>
> ======================================================================
> FAIL: Test get alleles.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "test_PopGen_GenePop_EasyController.py", line 57, in test_get_alleles
> assert self.ctrl.get_alleles(0,"Locus3") == [3, 20]
> AssertionError
>
>
> It is interesting that Jython is giving [20, 3] rather than [3, 20]. My
> guess would be this is down to something python implementation
> specific like the sort order of dictionaries or sets, in which case
> the unittest needs to compare sorted lists -- or the get_alleles
> method needs a sort?
>
> Peter
>
--
"If you want to get laid, go to college. If you want an education, go
to the library." - Frank Zappa
More information about the Biopython-dev
mailing list