Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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
            )
Ejemplo n.º 3
0
def test_default_task_runner():
    assert engine.get_default_task_runner_class() is engine.task_runner.TaskRunner