test_workflow.py
1 from sirocco import pretty_print 2 from sirocco.core import AvailableData, Workflow 3 4 # NOTE: import of ShellTask is required to populated in Task.plugin_classes in __init_subclass__ 5 from sirocco.core._tasks.shell_task import ShellTask # noqa: F401 6 7 8 def test_minimal_workflow(minimal_config): 9 testee = Workflow.from_config_workflow(minimal_config) 10 11 pretty_print.PrettyPrinter().format(testee) 12 13 assert len(list(testee.tasks)) == 1 14 assert len(list(testee.cycles)) == 1 15 assert isinstance(testee.data[("foo", {})], AvailableData) 16 assert testee.config_rootdir == minimal_config.rootdir 17 18 19 def test_invert_task_io_workflow(minimal_invert_task_io_config): 20 testee = Workflow.from_config_workflow(minimal_invert_task_io_config) 21 pretty_print.PrettyPrinter().format(testee)