test_greenlet_context_copying() — flask Function Reference
Architecture documentation for the test_greenlet_context_copying() function in test_reqctx.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 7fdf2a75_369a_3acf_8a49_51d83796e30f["test_greenlet_context_copying()"] d3571f99_30e7_c391_939e_411db4c2011d["TestGreenletContextCopying"] 7fdf2a75_369a_3acf_8a49_51d83796e30f -->|defined in| d3571f99_30e7_c391_939e_411db4c2011d 1096b6f8_f181_c055_be79_b7cbb61e997b["greenlet()"] 7fdf2a75_369a_3acf_8a49_51d83796e30f -->|calls| 1096b6f8_f181_c055_be79_b7cbb61e997b style 7fdf2a75_369a_3acf_8a49_51d83796e30f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_reqctx.py lines 150–177
def test_greenlet_context_copying(self, app, client):
greenlets = []
@app.route("/")
def index():
flask.session["fizz"] = "buzz"
ctx = app_ctx.copy()
def g():
assert not flask.request
assert not flask.current_app
with ctx:
assert flask.request
assert flask.current_app == app
assert flask.request.path == "/"
assert flask.request.args["foo"] == "bar"
assert flask.session.get("fizz") == "buzz"
assert not flask.request
return 42
greenlets.append(greenlet(g))
return "Hello World!"
rv = client.get("/?foo=bar")
assert rv.data == b"Hello World!"
result = greenlets[0].run()
assert result == 42
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does test_greenlet_context_copying() do?
test_greenlet_context_copying() is a function in the flask codebase, defined in tests/test_reqctx.py.
Where is test_greenlet_context_copying() defined?
test_greenlet_context_copying() is defined in tests/test_reqctx.py at line 150.
What does test_greenlet_context_copying() call?
test_greenlet_context_copying() calls 1 function(s): greenlet.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free