[Biopython-dev] test_PopGen_GenePop_EasyController.py failure on Jython

Peter Cock p.j.a.cock at googlemail.com
Fri Nov 12 12:18:52 EST 2010


Hi all,

I've exchanged a few emails with Tiago off list regarding an inconsistent
test_PopGen_GenePop_EasyController.py problem (most visible on
Jython), giving error "Unable to open file genepop.txt".

I've just had it from Python 2.7 on a 32bit Linux machine:

======================================================================
ERROR: test_get_avg_fst_pair (test_PopGen_GenePop_EasyController.AppTest)
Test get pairwise Fst.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pjcock/repositories/biopython/Tests/test_PopGen_GenePop_EasyController.py",
line 98, in test_get_avg_fst_pair
    pop_fis =  self.ctrl.get_avg_fst_pair()
  File "/home/pjcock/repositories/biopython/build/lib.linux-i686-2.7/Bio/PopGen/GenePop/EasyController.py",
line 162, in get_avg_fst_pair
    return self._controller.calc_fst_pair(self._fname)[1]
  File "/home/pjcock/repositories/biopython/build/lib.linux-i686-2.7/Bio/PopGen/GenePop/Controller.py",
line 819, in calc_fst_pair
    self._run_genepop([".ST2", ".MIG"], [6,2], fname)
  File "/home/pjcock/repositories/biopython/build/lib.linux-i686-2.7/Bio/PopGen/GenePop/Controller.py",
line 296, in _run_genepop
    % (ret, e_out.strip().split("\n",1)[0]))
IOError: GenePop error -11, Unable to open file genepop.txt

======================================================================
ERROR: test_get_avg_fst_pair_locus (test_PopGen_GenePop_EasyController.AppTest)
Test get average Fst for pairwise pops on a locus.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pjcock/repositories/biopython/Tests/test_PopGen_GenePop_EasyController.py",
line 93, in test_get_avg_fst_pair_locus
    self.assertEqual(len(self.ctrl.get_avg_fst_pair_locus("Locus4")), 45)
  File "/home/pjcock/repositories/biopython/build/lib.linux-i686-2.7/Bio/PopGen/GenePop/EasyController.py",
line 166, in get_avg_fst_pair_locus
    iter = self._controller.calc_fst_pair(self._fname)[0]
  File "/home/pjcock/repositories/biopython/build/lib.linux-i686-2.7/Bio/PopGen/GenePop/Controller.py",
line 819, in calc_fst_pair
    self._run_genepop([".ST2", ".MIG"], [6,2], fname)
  File "/home/pjcock/repositories/biopython/build/lib.linux-i686-2.7/Bio/PopGen/GenePop/Controller.py",
line 296, in _run_genepop
    % (ret, e_out.strip().split("\n",1)[0]))
IOError: GenePop error -11, Unable to open file genepop.txt

----------------------------------------------------------------------


This failed twice in a row, then passed four times in a row (Linux, Python 2.7).
I suspect the issue was related to machine IO load - during the first
tests I had
something compiling at the same time. I can't reproduce it on demand :(

I've also seen it on the Mac with Apple's Python 2.6 (although usually it is
usually fine).

However, I'm seeing this (consistently?) with Jython 2.5.1 on the Mac.

Peter


More information about the Biopython-dev mailing list