Home / Function/ test_cli_custom_obj() — flask Function Reference

test_cli_custom_obj() — flask Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

tests/test_testing.py lines 353–368

def test_cli_custom_obj(app):
    class NS:
        called = False

    def create_app():
        NS.called = True
        return app

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

    script_info = ScriptInfo(create_app=create_app)
    runner = app.test_cli_runner()
    runner.invoke(hello_command, obj=script_info)
    assert NS.called

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free