leak_detector() — flask Function Reference
Architecture documentation for the leak_detector() function in conftest.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD d4cc45d9_1a01_46e8_ac0f_a9a017e72f87["leak_detector()"] 91da8911_f5f3_2fff_0b5f_8e0f6b24cbf6["conftest.py"] d4cc45d9_1a01_46e8_ac0f_a9a017e72f87 -->|defined in| 91da8911_f5f3_2fff_0b5f_8e0f6b24cbf6 style d4cc45d9_1a01_46e8_ac0f_a9a017e72f87 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/conftest.py lines 85–96
def leak_detector():
"""Fails if any app contexts are still pushed when a test ends. Pops all
contexts so subsequent tests are not affected.
"""
yield
leaks = []
while _app_ctx:
leaks.append(_app_ctx._get_current_object())
_app_ctx.pop()
assert not leaks
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does leak_detector() do?
leak_detector() is a function in the flask codebase, defined in tests/conftest.py.
Where is leak_detector() defined?
leak_detector() is defined in tests/conftest.py at line 85.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free