swh_scheduler = <swh.scheduler.backend.SchedulerBackend object at 0x7fd65abe0a58>
def test_register_lister_unknown_task_type(swh_scheduler):
"""When scheduling unknown task type, the cli should raise."""
with pytest.raises(ValueError, match="Unknown"):
invoke(
swh_scheduler,
[
"register-lister",
> "unknown-task-type-should-raise",
],
)
.tox/py3/lib/python3.7/site-packages/swh/scheduler/tests/test_cli_add_forge_now.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/scheduler/tests/test_cli_add_forge_now.py:18: in invoke
scheduler, args=["add-forge-now", *args], catch_exceptions=catch_exceptions
.tox/py3/lib/python3.7/site-packages/swh/scheduler/tests/test_cli.py:45: in invoke
raise result.exception
.tox/py3/lib/python3.7/site-packages/click/testing.py:408: in invoke
return_value = cli.main(args=args or (), prog_name=prog_name, **extra)
.tox/py3/lib/python3.7/site-packages/click/core.py:1055: in main
rv = self.invoke(ctx)
.tox/py3/lib/python3.7/site-packages/click/core.py:1657: in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
.tox/py3/lib/python3.7/site-packages/click/core.py:1657: in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
.tox/py3/lib/python3.7/site-packages/click/core.py:1404: in invoke
return ctx.invoke(self.callback, **ctx.params)
.tox/py3/lib/python3.7/site-packages/click/core.py:760: in invoke
return __callback(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = ()
kwargs = {'lister_name': 'unknown-task-type-should-raise', 'options': ()}
def new_func(*args, **kwargs): # type: ignore
> return f(get_current_context(), *args, **kwargs)
E TypeError: register_lister_cli() missing 1 required positional argument: 'enabled'
.tox/py3/lib/python3.7/site-packages/click/decorators.py:26: TypeError
TEST RESULT
TEST RESULT
- Run At
- Dec 8 2022, 12:31 PM