Merge pull request #49 from hartym/0.2

Minor fixes (code coverage display in readme, and unit tests output)
This commit is contained in:
Romain Dorgueil
2017-05-01 08:37:43 -07:00
committed by GitHub
3 changed files with 9 additions and 6 deletions

View File

@ -31,7 +31,7 @@ Data-processing. By monkeys. For humans.
:target: https://landscape.io/github/python-bonobo/bonobo/0.2
:alt: Code Health from landscape
.. image:: https://img.shields.io/coveralls/python-bonobo/bonobo.svg
.. image:: https://img.shields.io/coveralls/python-bonobo/bonobo/0.2.svg
:target: https://coveralls.io/github/python-bonobo/bonobo?branch=0.2
:alt: Coverage

View File

@ -46,6 +46,7 @@ def run(graph, *chain, strategy=None, plugins=None, services=None):
graph = Graph(graph, *chain)
strategy = create_strategy(strategy)
plugins = plugins or []
if _is_interactive_console():

View File

@ -1,13 +1,15 @@
import pytest
import bonobo as bb
import bonobo.basics
import bonobo
from bonobo.execution import GraphExecutionContext
from mock import patch
@pytest.mark.timeout(2)
def test_run_graph_noop():
graph = bb.Graph(bonobo.basics.noop)
graph = bonobo.Graph(bonobo.noop)
assert len(graph) == 1
result = bb.run(graph, strategy='threadpool')
assert result
with patch('bonobo._api._is_interactive_console', side_effect=lambda: False):
result = bonobo.run(graph)
assert isinstance(result, GraphExecutionContext)