stop a doctest execution

Tarek Ziadé ziade.tarek at gmail.com
Fri Feb 24 10:55:23 EST 2006


Hello,

is there a simple way to stop a doctest execution within its code ?

my use case is to abort the execution of part of the doc, given an arbitrary
condition.
That could be: existence of a third party package or whatever.

Adding tests throughout the doctest does not look good.

Maybe it's time to implement the 'exit' builtin ?  ;)

Failed example:
     exit
 Expected nothing
 Got:
     'Use Ctrl-D (i.e. EOF) to exit.'


Tarek

--
Tarek Ziadé | Association AfPy | www.afpy.org
Site personnel | http://programmation-python.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060224/f74a88ab/attachment.html>


More information about the Python-list mailing list