

def test_run(self):
    '\n        Check correct signal handling in Scheduler.run().\n        '

    def send_stop_signal():
        '\n            Sleep for 1 second, then send a INT signal to ourself, so the\n            signal handler installed by scheduler.run() is called.\n            '
        time.sleep(1)
        os.kill(os.getpid(), signal.SIGINT)
    thread = Thread(target=send_stop_signal)
    thread.start()
    self.assertRaises(SystemExit, self.scheduler.run)
    thread.join()

dataset/ETHPy150Open ui/rq-scheduler/tests/test_scheduler.py TestScheduler.test_run/original