test_app_freed_on_zero_refcount() — flask Function Reference
Architecture documentation for the test_app_freed_on_zero_refcount() function in test_basic.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 22a0fbb7_79aa_ff4e_782a_cea16633a601["test_app_freed_on_zero_refcount()"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f["test_basic.py"] 22a0fbb7_79aa_ff4e_782a_cea16633a601 -->|defined in| 85bc4fb5_d1d7_a135_020d_69e052c12c0f style 22a0fbb7_79aa_ff4e_782a_cea16633a601 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_basic.py lines 1937–1949
def test_app_freed_on_zero_refcount():
# A Flask instance should not create a reference cycle that prevents CPython
# from freeing it when all external references to it are released (see #3761).
gc.disable()
try:
app = flask.Flask(__name__)
assert app.view_functions["static"]
weak = weakref.ref(app)
assert weak() is not None
del app
assert weak() is None
finally:
gc.enable()
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_app_freed_on_zero_refcount() do?
test_app_freed_on_zero_refcount() is a function in the flask codebase, defined in tests/test_basic.py.
Where is test_app_freed_on_zero_refcount() defined?
test_app_freed_on_zero_refcount() is defined in tests/test_basic.py at line 1937.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free