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

Function test_cli_empty

tests/test_cli.py:691–697  ·  view source on GitHub ↗

If a Blueprint's CLI group is empty, do not register it.

(app)

Source from the content-addressed store, hash-verified

689
690
691def test_cli_empty(app):
692 """If a Blueprint's CLI group is empty, do not register it."""
693 bp = Blueprint("blue", __name__, cli_group="blue")
694 app.register_blueprint(bp)
695
696 result = app.test_cli_runner().invoke(args=["blue", "--help"])
697 assert result.exit_code == 2, f"Unexpected success:\n\n{result.output}"
698
699
700def test_run_exclude_patterns():

Callers

nothing calls this directly

Calls 4

BlueprintClass · 0.90
test_cli_runnerMethod · 0.80
register_blueprintMethod · 0.45
invokeMethod · 0.45

Tested by

no test coverage detected