[Python-Dev] Exceptions doctest Re: Request for review

Nick Coghlan ncoghlan at gmail.com
Thu Apr 13 19:50:11 CEST 2006


Tim Peters wrote:
> Sorry, but it's horridly un-doctest-like to make inferences by magic. 
> If you want to add an explicit ACCEPT_EXCEPTION_SUBCLASS doctest
> option, that's a different story. I would question the need, since
> I've never got close to needing it, and never heard anyone else bring
> it up. Is this something that happens to you often enough to be an
> irritation, or is it just that your brain tells you it's a cool idea? 
> One reason I have to ask is that I'm pretty sure the example you gave
> is one that never bit you in real life.
>
You'd be guessing right - and the explanation of how you meant the term makes 
a lot of sense, too. Consider my crazy idea withdrawn :)
A real limitation I *have* encountered is that doctest doesn't like the idea 
of a single statement that triggers normal output followed by an exception (it 
expects one or the other). However, the case where I wanted that was rather 
esoteric and easy enough to deal with by using a custom result checker.
Cheers,
Nick.
-- 
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
 http://www.boredomandlaziness.org


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /