[Biopython-dev] test_PopGen_GenePop_EasyController.py failure on Jython
Peter
biopython at maubp.freeserve.co.uk
Wed Nov 10 11:48:30 UTC 2010
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
More information about the Biopython-dev
mailing list