diff --git a/luigi/interface.py b/luigi/interface.py index fe51e8649a..c01487fa66 100644 --- a/luigi/interface.py +++ b/luigi/interface.py @@ -143,6 +143,8 @@ def run(tasks, worker_scheduler_factory=None, override_defaults=None): if worker_scheduler_factory is None: worker_scheduler_factory = WorkerSchedulerFactory() + if override_defaults is None: + override_defaults = {} env_params = core(**override_defaults) # search for logging configuration path first on the command line, then # in the application config file diff --git a/test/interface_test.py b/test/interface_test.py index 918c52f842..398ed4ed3c 100644 --- a/test/interface_test.py +++ b/test/interface_test.py @@ -49,6 +49,12 @@ def test_interface_run_positive_path(self): self.assertTrue(self._run_interface()) + def test_interface_default_override_defaults(self): + self.worker.add = Mock(side_effect=[True, True]) + self.worker.run = Mock(return_value=True) + + self.assertTrue(Interface.run([self.task_a, self.task_b], self.worker_scheduler_factory)) + def test_interface_run_with_add_failure(self): self.worker.add = Mock(side_effect=[True, False]) self.worker.run = Mock(return_value=True)