[Biopython-dev] Re: [BioPython] tests failing

Jeffrey Chang jchang at SMI.Stanford.EDU
Wed Aug 1 13:30:46 EDT 2001


I think this may be a problem in test_prodoc.py rather than the 
regression testing framework.  This output is generated in a function 
called print_references:

def print_references( list ):
     for item in list:
         text = item.number + ' ' + item.authors + ' ' + item.citation
         while text:
             print text[ :80 ]
             text = text[ 80: ]

It prints some text out 80 characters at a time.  Perhaps this 
boundary is falling on different characters depending on the OS' line 
breaking convention.  To make things more difficult, the text file 
itself has different types of line breaks.

I've gone through and changed this code to:

def print_references( list ):
     for item in list:
         print item.number
         print item.authors
         print item.citation

and submitted the changes and the new output to CVS.

I don't have a reproducible here, so could someone with a Windows 
machine take a look at it?

Thanks,
Jeff


>  > >Failure: test_prodoc
>>  >
>>  >AssertionError:
>>  >Output: 'J. \n'
>>  >Expected: 'J. \n'
>>
>>  Brad, this looks pretty odd.  Is it a newline problem?
>
>This is another one I've seen on Windows and also on Yair's Mac stuff,
>but have to throw my hands up in the air about. What Mark reported
>here is different from what I've seen -- my error looks like:
>
>Output: 'J. \n'
>Expected: 'J.\n'
>
>So, there is, for some unknown reason, as extra space generated at the
>end of the line, that we don't see on UNIX platforms. I'm not sure
>what is going on here, or how we can make the regression tester stop
>choking on it (other than reintroducing my "end of the line whitespace
>isn't important stuff" :-).
>
>Any ideas for anyone? I'd definately like to clear up these two
>problems if we could.
>
>Brad



More information about the Biopython-dev mailing list