Message256656
unittest.signals._InterruptHandler is very nice: on first ^C it tells any registered unittest Result instances to gracefully stop the test run, and on any subsequent ^C it defers to the default interrupt handler, which immediately terminates the test run (possibly without giving it a chance to output summary information).
This doesn't work very well when a test runner forgets to register the Result instance: the first ^C is then quietly ignored. (See https://github.com/django-nose/django-nose/issues/252 for an example.)
Suggestion: if there are no registered results in the unittest.signals._results dict, don't silently ignore the first ^C. Instead, immediately defer to the saved interrupt handler.
Since code is often clearer than words, I'm attaching a patch. |
|
Date |
User |
Action |
Args |
2015-12-18 08:48:29 | mgedmin | set | recipients:
+ mgedmin |
2015-12-18 08:48:29 | mgedmin | set | messageid: <1450428509.62.0.620097682631.issue25900@psf.upfronthosting.co.za> |
2015-12-18 08:48:29 | mgedmin | link | issue25900 messages |
2015-12-18 08:48:29 | mgedmin | create | |
|