On Wed, Dec 9, 2009 at 5:47 PM, Paul Moore <p.f.mo...@gmail.com> wrote: > 2009/12/9 Lennart Regebro <lrege...@jarn.com>: >> On Wed, Dec 9, 2009 at 18:45, Ian Bicking <i...@colorstudy.com> wrote: >>> It's about time doctest got another run of development anyway. I can >>> imagine a couple features that might help: >>> * Already in there, but sometimes hard to enable, is ellipsis. Can you >>> already do this? >>> >>> >>> throw_an_exception() >>> Traceback (most recent call last): >>> ... >>> DesiredException: ... >> >> I think so, but what you need is: >> >>> >>> throw_an_exception() >>> Traceback (most recent call last): >>> ... >>> ...DesiredException: ... > > No you don't. From the manual: > > """ > When the IGNORE_EXCEPTION_DETAIL doctest option is is specified, > everything following the leftmost colon is ignored. > """ > > So just use #doctest: +IGNORE_EXCEPTION_DETAIL
Maybe that could be extended to also ignore everything up to a period (i.e., ignore the module name that seems to show up in 2.7 exception names, but not in previous versions). -- Ian Bicking | http://blog.ianbicking.org | http://topplabs.org/civichacker _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com