'Runs the test suite after registering a custom signal handler
that triggers a graceful exit when Ctrl-C is pressed.'

def run(self, *args, **kwargs):

    self._default_keyboard_interrupt_handler = signal.signal(signal.SIGINT, self._keyboard_interrupt_handler)
    try:
        result = super(DjangoTestRunner, self).run(*args, **kwargs)
    finally:
        signal.signal(signal.SIGINT, self._default_keyboard_interrupt_handler)
    return result
