Home / Function/ test_app_tearing_down_with_handled_exception_by_except_block() — flask Function Reference

test_app_tearing_down_with_handled_exception_by_except_block() — flask Function Reference

Architecture documentation for the test_app_tearing_down_with_handled_exception_by_except_block() function in test_appctx.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  8db0f09c_7a66_3c7d_b69a_205b5c2fa587["test_app_tearing_down_with_handled_exception_by_except_block()"]
  64d09782_9311_5dea_7886_5faca96ebc84["test_appctx.py"]
  8db0f09c_7a66_3c7d_b69a_205b5c2fa587 -->|defined in| 64d09782_9311_5dea_7886_5faca96ebc84
  style 8db0f09c_7a66_3c7d_b69a_205b5c2fa587 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_appctx.py lines 74–87

def test_app_tearing_down_with_handled_exception_by_except_block(app):
    cleanup_stuff = []

    @app.teardown_appcontext
    def cleanup(exception):
        cleanup_stuff.append(exception)

    with app.app_context():
        try:
            raise Exception("dummy")
        except Exception:
            pass

    assert cleanup_stuff == [None]

Subdomains

Frequently Asked Questions

What does test_app_tearing_down_with_handled_exception_by_except_block() do?
test_app_tearing_down_with_handled_exception_by_except_block() is a function in the flask codebase, defined in tests/test_appctx.py.
Where is test_app_tearing_down_with_handled_exception_by_except_block() defined?
test_app_tearing_down_with_handled_exception_by_except_block() is defined in tests/test_appctx.py at line 74.

Analyze Your Own Codebase

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

Try Supermodel Free