test_client_pop_all_preserved() — flask Function Reference
Architecture documentation for the test_client_pop_all_preserved() function in test_testing.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD ff328234_6c6c_c49f_a3eb_9117184ea470["test_client_pop_all_preserved()"] 8c162ff0_0a8a_d943_77b6_c07b38d297a0["test_testing.py"] ff328234_6c6c_c49f_a3eb_9117184ea470 -->|defined in| 8c162ff0_0a8a_d943_77b6_c07b38d297a0 style ff328234_6c6c_c49f_a3eb_9117184ea470 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_testing.py lines 371–385
def test_client_pop_all_preserved(app, req_ctx, client):
@app.route("/")
def index():
# stream_with_context pushes a third context, preserved by response
return flask.stream_with_context("hello")
# req_ctx fixture pushed an initial context
with client:
# request pushes a second request context, preserved by client
rv = client.get("/")
# close the response, releasing the context held by stream_with_context
rv.close()
# only req_ctx fixture should still be pushed
assert _cv_app.get(None) is req_ctx
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_client_pop_all_preserved() do?
test_client_pop_all_preserved() is a function in the flask codebase, defined in tests/test_testing.py.
Where is test_client_pop_all_preserved() defined?
test_client_pop_all_preserved() is defined in tests/test_testing.py at line 371.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free