Home / Function/ test_clean_pop() — flask Function Reference

test_clean_pop() — flask Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

tests/test_appctx.py lines 194–210

def test_clean_pop(app):
    app.testing = False
    called = []

    @app.teardown_request
    def teardown_req(error=None):
        raise ZeroDivisionError

    @app.teardown_appcontext
    def teardown_app(error=None):
        called.append("TEARDOWN")

    with app.app_context():
        called.append(flask.current_app.name)

    assert called == ["flask_test", "TEARDOWN"]
    assert not flask.current_app

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free