[Biopython-dev] [Bug 2651] Error from test_GAQueens.py

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Mon Nov 10 23:28:26 UTC 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2651


biopython-bugzilla at maubp.freeserve.co.uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
          Component|Main Distribution           |Unit Tests




------- Comment #1 from biopython-bugzilla at maubp.freeserve.co.uk  2008-11-10 18:28 EST -------
What bug in Seq?  Trying to call the count method with an integer argument
instead of string or another Seq should fail - try it on a string for
comparison:

>>> "123456".count(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: expected a character buffer object

I would agree that the TypeError message could be better, "object of type 'int'
has no len()" is a little misleading.  Are you suggesting that be changed?

Genetic algorithms (with a random seed at least) are non deterministic - I've
seen some of the GA unit tests fail every so often (but I'm not sure off hand
if its just test_GAQueens or not).  Rerunning the test will usually be fine. 
The traceback looks familiar so its probably the same issue, but I haven't had
the time or desire to trace through the code to try and work out what is going
wrong.  I would guess it fails far less than 10% of time, but maybe 1% or 2%. 
I guess a quick shell script would answer this ;)

Maybe we should catch the error condition and issue a runtime error saying
"Didn't converge" or whatever would be appropriate terminology.  Or
automatically restart the test?  Or, maybe we can solve the unit test failure
by specifying a random seed - that might be a neat solution.

N.B. Refiling under unit tests.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list