Re: windows newslines in doctests

Chris Withers <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
Benji York wrote:
> On Tue, Dec 29, 2009 at 2:15 PM, Chris Withers <[email protected]> wrote:
>> Fred Drake wrote:
>>> It's interesting to note that Python 2.6's doctest doesn't use
>>> universal newlines, but zope.testing.doctest.
> 
>> Interestingly, the doctests I referred to in my original post were
>> Manuel doctests, which (Benji, lemme know if I'm wrong...) use Python's
>> doctest module rather than zope.testing's one, in which case I think you
>>  may have hit the nail precisely on the head...
> 
> Manuel uses Python's doctest module for the actual work, but the file
> reading is done by Manuel itself.  I could switch to using universal new
> line mode, but since I haven't seen an example of a filing test I can't
> be sure if it'll help or not.

The problems I had were with tests originally authored on Windows, 
checked into svn without an svn:eol-style and then checked out on linux. 
The error message was about inconsistent line endings even though they 
were all consistent, just \r\n rather than \n. I had to dos2unix them 
and then add an svn:eol-style (which not all RCS support) to get things 
working properly...

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk
_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.