Re: to Doctest as SystemExit is to Python

2007-12-13 Thread pelavarre
Sent: 2006-11-09; To: comp.lang.python Can doctest ... be persuaded to exit after a catastroph[e]...? ... sys.exit() doesn't do what I mean: it raises SystemExit ... [and doesn't exit] ... doctest.REPORT_ONLY_FIRST_FAILURE doesn't do what I mean [it filters stdout but doesn't exit] Yes

Re: to Doctest as SystemExit is to Python

2006-11-10 Thread Peter Otten
[EMAIL PROTECTED] wrote: Can I somehow tell doctest that it's time to quit? Hit Ctrl-C. Or raise a KeyboardInterrupt: import sys class ExitDoctest(KeyboardInterrupt): pass def f(what): f(alpha) 'alpha' f(e) 'e' f(x) 'x' f(X) 'X' f(beta)

to Doctest as SystemExit is to Python

2006-11-09 Thread p . lavarre
From: http://docs.python.org/lib/doctest-soapbox.html ... Regression testing is best confined to dedicated objects or files ... Can I somehow tell doctest that it's time to quit? I ask because not all doctest examples are created equal. Some failures are catastrophic, making all subsequent