def test_default_task_runner_responds_to_config(): with utilities.configuration.set_temporary_config({ "engine.task_runner.default_class": "prefect.engine.cloud.CloudTaskRunner" }): assert engine.get_default_task_runner_class( ) is engine.cloud.CloudTaskRunner
def test_default_task_runner_with_bad_config(): with utilities.configuration.set_temporary_config( {"engine.task_runner.default_class": "prefect.engine. bad import path"} ): with pytest.warns(UserWarning): assert ( engine.get_default_task_runner_class() is engine.task_runner.TaskRunner )
def test_default_task_runner(): assert engine.get_default_task_runner_class() is engine.task_runner.TaskRunner