[Zope3-dev] Re: help with doctests

Adam Groszer agroszer at gmail.com
Fri Jul 20 05:35:00 EDT 2007


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 exception, the output part must be of the form
>> 
>>   Traceback (most recent call last):
>>     ...
>>   <exception type>: <exception value>
>> 
>> You can use ellipsis in the exception value part, IIRC.

> But I wouldn't recommend using them. Sometimes, using ellipses are fine,
> but generally they obfuscate the doctest when you're reading it. 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/trunk/src/zope/testing/renormalizing.py?rev=66267&view=auto

-- 
Best regards,
 Adam                            mailto:agroszer at gmail.com



More information about the Zope3-dev mailing list