Hello,
In z.a.apidoc.browser.README.txt I can write
"""
>>> browser.open('http://localhost/++apidoc++/non-existent/')
Traceback (most recent call last):
...
httperror_seek_wrapper: HTTP Error 404: Not Found
"""
(test passes)
but I can't write
"""
>>> browser.open('http://localhost/++api
Hi Adam
> Auftrag von Adam Groszer
> Gesendet: Freitag, 20. Juli 2007 09:49
> An: zope3-dev
> Betreff: [Zope3-dev] help with doctests
>
> Hello,
>
> In z.a.apidoc.browser.README.txt I can write """
> >>> browser.open('http://localhost/++apidoc++/non-existent/')
> Traceback (most recent call
Hi Roger!
Yes, it's the same :-(
Friday, July 20, 2007, 9:59:48 AM, you wrote:
RI> Hi Adam
>> Auftrag von Adam Groszer
>> Gesendet: Freitag, 20. Juli 2007 09:49
>> An: zope3-dev
>> Betreff: [Zope3-dev] help with doctests
>>
>> Hello,
>>
>> In z.a.apidoc.browser.README.txt I can write """
>>
Hello,
How to solve the \r\n and \n mismatch between win32 and *nix in the
doctests?
doctest is:
"""
>>> ctrl.value
'Text inside\narea!\n '
"""
fails with (on win32):
"""
Failed example:
ctrl.value
Expected:
'Text inside\narea!\n '
Got:
Doesn't NORMALIZE_WHITESPACE help here?
Stefan
On 20. Jul 2007, at 10:09, Adam Groszer wrote:
How to solve the \r\n and \n mismatch between win32 and *nix in the
doctests?
--
Anything that happens, happens. --Douglas Adams
___
Zope3-dev mailing
Hello Stefan,
It seems to be already enabled:
flags = doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS
readme = FunctionalDocFileSuite('README.txt', optionflags=flags,
checker=checker)
Friday, July 20, 2007, 10:18:30 AM, you wrote:
> Doesn't NORMALIZE_WHITESPACE help here?
> Ste
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\narea!\n '
> """
>
> fails with (on win32):
> """
> Failed
Hello Marius,
Great, that works ;-)
Thought that there is some more genreic-sane way.
Friday, July 20, 2007, 10:25:02 AM, you wrote:
> 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?
>
On Fri, Jul 20, 2007 at 09:48:52AM +0200, Adam Groszer wrote:
> Hello,
>
> In z.a.apidoc.browser.README.txt I can write
> """
> >>> browser.open('http://localhost/++apidoc++/non-existent/')
> Traceback (most recent call last):
> ...
> httperror_seek_wrapper: HTTP Error 404: Not Found
> """
Marius Gedminas wrote:
doctests have special rules for exceptions that are different from the
rules of normal output matching.
If a statement raises an exception, the output part must be of the form
Traceback (most recent call last):
...
:
You can use ellipsis in the exception value p
Adam Groszer wrote:
Great, that works ;-)
Thought that there is some more genreic-sane way.
There is. NORMALIZE_WHITESPACE actually only helps when whatever you're
outputting actually prints whitespace. Doing this::
>>> ' '
' '
won't invoke the whitespace normalizer. Doing this::
Hello Philipp,
Great, that would solve also the \r\n substitution also (I hope).
Friday, July 20, 2007, 11:27:52 AM, you wrote:
> Marius Gedminas wrote:
>> doctests have special rules for exceptions that are different from the
>> rules of normal output matching.
>>
>> If a statement raises an e
Philipp von Weitershausen wrote:
Sometimes, using ellipses are fine, but generally they obfuscate the
doctest when you're reading it. I suggesting using the
regex-normalizer [1].
+1
--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-dev
On Jul 20, 2007, at 5:27 AM, Philipp von Weitershausen wrote:
Marius Gedminas wrote:
doctests have special rules for exceptions that are different from
the
rules of normal output matching.
If a statement raises an exception, the output part must be of the
form
Traceback (most recent cal
On Fri, Jul 20, 2007 at 07:57:12AM -0400, Jim Fulton wrote:
> On Jul 20, 2007, at 5:27 AM, Philipp von Weitershausen wrote:
> >I suggesting using the regex-normalizer [1]. There are many
> >packages out there that use it if you're looking for examples.
> >
> >http://svn.zope.org/zope.testing/trun
On Fri, Jul 20, 2007 at 11:30:08AM +0200, Philipp von Weitershausen wrote:
> Adam Groszer wrote:
> >Great, that works ;-)
> >Thought that there is some more genreic-sane way.
>
> There is. NORMALIZE_WHITESPACE actually only helps when whatever you're
> outputting actually prints whitespace. Doing
16 matches
Mail list logo