Home / Function/ test_cli_invoke() — flask Function Reference

test_cli_invoke() — flask Function Reference

Architecture documentation for the test_cli_invoke() function in test_testing.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  0d2de428_37b4_02f9_c729_5ca6a320ed0c["test_cli_invoke()"]
  8c162ff0_0a8a_d943_77b6_c07b38d297a0["test_testing.py"]
  0d2de428_37b4_02f9_c729_5ca6a320ed0c -->|defined in| 8c162ff0_0a8a_d943_77b6_c07b38d297a0
  style 0d2de428_37b4_02f9_c729_5ca6a320ed0c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_testing.py lines 339–350

def test_cli_invoke(app):
    @app.cli.command("hello")
    def hello_command():
        click.echo("Hello, World!")

    runner = app.test_cli_runner()
    # invoke with command name
    result = runner.invoke(args=["hello"])
    assert "Hello" in result.output
    # invoke with command object
    result = runner.invoke(hello_command)
    assert "Hello" in result.output

Subdomains

Frequently Asked Questions

What does test_cli_invoke() do?
test_cli_invoke() is a function in the flask codebase, defined in tests/test_testing.py.
Where is test_cli_invoke() defined?
test_cli_invoke() is defined in tests/test_testing.py at line 339.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free