On Wed, Dec 30, 2009 at 03:08:26PM +0100, Lennart Regebro wrote: > On Wed, Dec 30, 2009 at 13:45, Marius Gedminas <mar...@gedmin.as> wrote: > > I don't remember, exactly, I was just grepping the diffs for > > DocTestFailureException. It's probably the bit that lets bin/test -c > > colorize things like diffs, and tracebacks in doctest failures. > > If that's the case, I'd truly hate to lose this feature, it helps me > > immensely. > > OK, so that colorizing support could probably also be moved into stdlib. > If someone (ie you, you seem to be on top of the problems) get diffs > into the Python tracker then maybe we could get it into Python 2.7 and > 3.2, which would be cool.
The only thing needed from doctest.py, AFAIU, is a custom exception class inheriting from AssertionError, so the test runner (which does the colorization) can distinguish doctest errors from regular assertion failures. It should be simple to monkey-patch this too, by setting DocTestCase.failureException, so we can support Python 2.5 through 3.1 > > How mechanical can such a transformation be? Is it sufficient to > > replace > > > > zope.testing.doctest.DocFileSuite('foo.txt', **kw) > > > > with > > > > manuel.testing.TestSuite(manuel.doctest.Manuel(), 'foo.txt', **kw) > > No idea, the Manuel experts need to answer that. :) I was afraid you'd say that... Marius Gedminas -- http://pov.lt/ -- Zope 3 consulting and development
signature.asc
Description: Digital signature
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org 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 )