def test_run(capsys): entrypoint(['run', '--quiet', get_examples_path('types/strings.py')]) out, err = capsys.readouterr() out = out.split('\n') assert out[0].startswith('Foo ') assert out[1].startswith('Bar ') assert out[2].startswith('Baz ')
def test_no_command(capsys): with pytest.raises(SystemExit): entrypoint([]) _, err = capsys.readouterr() assert 'error: the following arguments are required: command' in err
if __name__ == "__main__": from bonobo.commands import entrypoint import sys entrypoint(["examples"] + sys.argv[1:])
def runner_entrypoint(*args): """ Run bonobo using the python command entrypoint directly (bonobo.commands.entrypoint). """ return entrypoint(list(args))
def runner_entrypoint(args): """ Run bonobo using the python command entrypoint directly (bonobo.commands.entrypoint). """ return entrypoint(args)
from bonobo.commands import entrypoint if __name__ == '__main__': entrypoint()
if __name__ == '__main__': from bonobo.commands import entrypoint import sys entrypoint(['examples'] + sys.argv[1:])