From d3daee1234f3de5356004772c6f51cf85d5e2ff6 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Mon, 1 May 2017 17:08:31 +0200 Subject: [PATCH 1/2] remove run() output from basicusage timed test. --- bonobo/_api.py | 1 + tests/test_basicusage.py | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/bonobo/_api.py b/bonobo/_api.py index 1c05e59..97678f5 100644 --- a/bonobo/_api.py +++ b/bonobo/_api.py @@ -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(): diff --git a/tests/test_basicusage.py b/tests/test_basicusage.py index 282cc85..1cd84a2 100644 --- a/tests/test_basicusage.py +++ b/tests/test_basicusage.py @@ -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) From 892da59f0123e955fc651a161c73d5106a835d99 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Mon, 1 May 2017 17:11:31 +0200 Subject: [PATCH 2/2] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 2ee631e..83846f4 100644 --- a/README.rst +++ b/README.rst @@ -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