[tests] Adds runners descriptions.

This commit is contained in:
Romain Dorgueil
2017-07-15 13:56:51 +02:00
parent 9c98802763
commit 75c15ae1f8

View File

@ -10,10 +10,12 @@ from bonobo.commands import entrypoint
def runner_entrypoint(*args):
""" Run bonobo using the python command entrypoint directly (bonobo.commands.entrypoint). """
return entrypoint(list(args))
def runner_module(*args):
""" Run bonobo using the bonobo.__main__ file, which is equivalent as doing "python -m bonobo ..."."""
with patch.object(sys, 'argv', ['bonobo', *args]):
return runpy.run_path(__main__.__file__, run_name='__main__')