test_teardown_with_handled_exception() — flask Function Reference
Architecture documentation for the test_teardown_with_handled_exception() function in test_reqctx.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 344abad0_38b6_a739_7ebb_ef3cae743797["test_teardown_with_handled_exception()"] aea65cbf_db83_bd4f_d83f_1a35ae104254["test_reqctx.py"] 344abad0_38b6_a739_7ebb_ef3cae743797 -->|defined in| aea65cbf_db83_bd4f_d83f_1a35ae104254 style 344abad0_38b6_a739_7ebb_ef3cae743797 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_reqctx.py lines 47–60
def test_teardown_with_handled_exception(app):
buffer = []
@app.teardown_request
def end_of_request(exception):
buffer.append(exception)
with app.test_request_context():
assert buffer == []
try:
raise Exception("dummy")
except Exception:
pass
assert buffer == [None]
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_teardown_with_handled_exception() do?
test_teardown_with_handled_exception() is a function in the flask codebase, defined in tests/test_reqctx.py.
Where is test_teardown_with_handled_exception() defined?
test_teardown_with_handled_exception() is defined in tests/test_reqctx.py at line 47.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free