[Zope3-dev] doctest prb again
Marius Gedminas
mgedmin at b4net.lt
Fri Jul 20 04:25:02 EDT 2007
On Fri, Jul 20, 2007 at 10:09:18AM +0200, Adam Groszer wrote:
> Hello,
>
> How to solve the \r\n and \n mismatch between win32 and *nix in the
> doctests?
>
> doctest is:
> """
> >>> ctrl.value
> ' Text inside\n area!\n '
> """
>
> fails with (on win32):
> """
> Failed example:
> ctrl.value
> Expected:
> ' Text inside\n area!\n '
> Got:
> ' Text inside\r\n area!\r\n '
> """
>
> ctrl.value comes from a html file in zope.testbrowser.ftests
You could do
>>> ctrl.value.replace('\r', '')
or strip the \r's in the place where you're reading that html file.
Marius Gedminas
--
This host is a black hole at HTTP wavelengths. GETs go in, and nothing
comes out, not even Hawking radiation.
-- Graaagh the Mighty on rec.games.roguelike.angband
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20070720/93426f1b/attachment.bin
More information about the Zope3-dev
mailing list