This is the commit where I admit that having more than one input/output format for readers and writers was complicating the code too much for a very small gain, and that it would be easier to only have one way to do it. So such way is now: - Returning (or yielding) a dict if you have key-value type collections. - Returning (or yielding) a tuple if you have a list-type collection. - Returning (or yielding) something else otherwise, which will continue to work like the old "arg0" format. IOFORMAT options has been removed in favour of a RemovedOption, which will complain if you're still trying to set it to anything else than the one value allowed.
17 lines
402 B
Python
17 lines
402 B
Python
import pytest
|
|
|
|
import bonobo
|
|
from bonobo.execution import GraphExecutionContext
|
|
from unittest.mock import patch
|
|
|
|
|
|
@pytest.mark.timeout(2)
|
|
def test_run_graph_noop():
|
|
graph = bonobo.Graph(bonobo.noop)
|
|
assert len(graph) == 1
|
|
|
|
with patch('bonobo._api._is_interactive_console', side_effect=lambda: False):
|
|
result = bonobo.run(graph)
|
|
|
|
assert isinstance(result, GraphExecutionContext)
|