@patch('luigi.contrib.external_program.subprocess.Popen')
    def test_app_interruption(self, proc):

        def interrupt():
            raise KeyboardInterrupt()

        proc.return_value.wait = interrupt
        try:
            job = TestSparkSubmitTask()
            job.run()
        except __HOLE__:
            pass
        proc.return_value.kill.check_called()
dataset/ETHPy150Open spotify/luigi/test/contrib/spark_test.py/SparkSubmitTaskTest.test_app_interruption