Home / Function/ test_app_tearing_down_with_previous_exception() — flask Function Reference

test_app_tearing_down_with_previous_exception() — flask Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

tests/test_appctx.py lines 56–71

def test_app_tearing_down_with_previous_exception(app):
    cleanup_stuff = []

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

    try:
        raise Exception("dummy")
    except Exception:
        pass

    with app.app_context():
        pass

    assert cleanup_stuff == [None]

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free