[py-dev] Catching KeyboardInterrupt

holger krekel hpk at trillke.net
Mon May 16 09:21:41 CEST 2005


On Sun, May 15, 2005 at 23:28 -0500, Ian Bicking wrote:
> It would be nice if py.test didn't so cleanly exit from a 
> KeyboardInterrupt -- right now I'm encountering a test that hangs, which 
> I usually figure out by ^C'ing and seeing what the traceback says.  At 
> least, that's what I've become used to doing.

I think the use cases are about split: sometimes you hit
KeyboardInterrupt because you realized you didn't want to run
this command and sometimes you hit it because you want to
break out of a loop. 

So now KeyboardInterrupt passes through if verbose > 0.  
Does that make sense to you? 
    
    holger


More information about the py-dev mailing list