Re: Re-normalizers instead of ellipses in doctests [was: some checkin]
Jim Fulton <[email protected]> Wed, 26 Sep 2007 18:18:33 -0400
| Newsgroups | gmane.comp.web.zope.zope3 |
|---|---|
| Message-ID | <[email protected]> |
On Sep 26, 2007, at 5:52 PM, Philipp von Weitershausen wrote: > Marius Gedminas wrote: >> Log message for revision 80145: >> Make the test pass on both Python 2.4 and 2.5. >> > ... >> -=- >> Modified: z3c.form/trunk/src/z3c/form/action.txt >> =================================================================== >> --- z3c.form/trunk/src/z3c/form/action.txt 2007-09-26 21:26:25 UTC >> (rev 80144) >> +++ z3c.form/trunk/src/z3c/form/action.txt 2007-09-26 21:49:09 UTC >> (rev 80145) >> @@ -236,4 +236,5 @@ >> <ActionErrorOccurred for <Action 'cancel' u'Cancel'>> >> >>> eventlog[-1].error >> - <ActionExecutionError wrapping >> <zope.interface.exceptions.Invalid ...>> >> + <ActionExecutionError wrapping ...Invalid...> >> + > > It's too bad that Exception's __repr__ changed in Python 2.5. The > reason is that it's a new-style class now, which is actually a > benefit at the same time. > > Anyway, these ellipses are very ugly and confusing. I think they're > okay-ish when you know exactly what they're supposed to stand for. > In this case we can definitely do better. They also have the disadvantage that they can swallow unexpected output. This is a fairly serious downside. It would be nice if doctest provided a variation on ellipsis that didn't consume newlines. Jim -- Jim Fulton Zope Corporation