'Handles Ctrl-C by setting a flag that will stop the test run when
the currently running test completes.'

def _keyboard_interrupt_handler(self, signal_number, stack_frame):

    self._keyboard_interrupt_intercepted = True
    sys.stderr.write('    <Test    run    halted    by    Ctrl-C>    ')
    signal.signal(signal.SIGINT, self._default_keyboard_interrupt_handler)
