[Biopython-dev] Newline fun (was Re: regression test code)
Brad Chapman
chapmanb at arches.uga.edu
Thu Feb 15 16:06:33 EST 2001
[me]
> > > I'm suddenly getting 7
> > >tests failing, and most of the problems look like line ending
> > >problems. Just curious...
[Andrew]
> > Of course, the other reason to switch is then I don't need
> > to fix the regrtest bug with different newlines :)
[Jeff]
> Yes, we definitely need this feature.
Aha! I figured out the problem -- it appears that python 2.1 handles
newlines differently:
[Tests]$ python
Python 2.1a2 (#1, Feb 3 2001, 15:37:56)
[GCC 2.95.2 19991024 (release/franzo)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> spam = "I have a newline\n"
>>> spam
'I have a newline\n'
>>>
[Tests]$ python2.0
Python 2.0 (#2, Jan 13 2001, 16:29:22)
[GCC 2.95.2 19991024 (release/franzo)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> spam = "I have a newline too\n"
>>> spam
'I have a newline too\012'
>>>
Blah, so everytime we had a \012 in a string output before, python2.1
is now generating a \n, so it makes the regression comparisons fail.
<sigh>
The fun of line breaks never stops.
Brad
More information about the Biopython-dev
mailing list