diff --git a/luigi/retcodes.py b/luigi/retcodes.py index d229fc5ac2..91245d9f38 100644 --- a/luigi/retcodes.py +++ b/luigi/retcodes.py @@ -43,8 +43,8 @@ class retcode(luigi.Config): description='For both local --lock and luigid "lock"', ) scheduling_error = IntParameter(default=4, - description='''For when a task's complete() or requires() fails.''' - ) + description='''For when a task's complete() or requires() fails.''' + ) def run_with_retcodes(argv): diff --git a/test/worker_parallel_scheduling_test.py b/test/worker_parallel_scheduling_test.py index 47486c4044..b6466a59c4 100644 --- a/test/worker_parallel_scheduling_test.py +++ b/test/worker_parallel_scheduling_test.py @@ -26,6 +26,7 @@ import mock import psutil from luigi.worker import Worker +from luigi.task_status import UNKNOWN def running_children(): @@ -138,7 +139,8 @@ def test_multiprocess_scheduling_with_overlapping_dependencies(self): def test_raise_exception_in_complete(self, send): self.w.add(ExceptionCompleteTask(), multiprocess=True) send.check_called_once() - self.assertEqual(0, self.sch.add_task.call_count) + self.assertEqual(UNKNOWN, self.sch.add_task.call_args[1]['status']) + self.assertFalse(self.sch.add_task.call_args[1]['runnable']) self.assertTrue('assert False' in send.call_args[0][1]) @mock.patch('luigi.notifications.send_error_email') @@ -154,14 +156,16 @@ def test_raise_unpicklable_exception_in_complete(self, send): # verify this can run async self.w.add(UnpicklableExceptionTask(), multiprocess=True) send.check_called_once() - self.assertEqual(0, self.sch.add_task.call_count) + self.assertEqual(UNKNOWN, self.sch.add_task.call_args[1]['status']) + self.assertFalse(self.sch.add_task.call_args[1]['runnable']) self.assertTrue('raise UnpicklableException()' in send.call_args[0][1]) @mock.patch('luigi.notifications.send_error_email') def test_raise_exception_in_requires(self, send): self.w.add(ExceptionRequiresTask(), multiprocess=True) send.check_called_once() - self.assertEqual(0, self.sch.add_task.call_count) + self.assertEqual(UNKNOWN, self.sch.add_task.call_args[1]['status']) + self.assertFalse(self.sch.add_task.call_args[1]['runnable']) if __name__ == '__main__':