MCPcopy
hub / github.com/pallets/flask / test_flaskgroup_nested

Function test_flaskgroup_nested

tests/test_cli.py:385–395  ·  view source on GitHub ↗
(app, runner)

Source from the content-addressed store, hash-verified

383
384
385def test_flaskgroup_nested(app, runner):
386 cli = click.Group("cli")
387 flask_group = FlaskGroup(name="flask", create_app=lambda: app)
388 cli.add_command(flask_group)
389
390 @flask_group.command()
391 def show():
392 click.echo(current_app.name)
393
394 result = runner.invoke(cli, ["flask", "show"])
395 assert result.output == "flask_test\n"
396
397
398def test_no_command_echo_loading_error():

Callers

nothing calls this directly

Calls 2

FlaskGroupClass · 0.90
invokeMethod · 0.45

Tested by

no test coverage detected