MCPcopy Create free account
hub / github.com/pallets/flask / teardown_request2

Function teardown_request2

tests/test_basic.py:801–810  ·  view source on GitHub ↗
(exc)

Source from the content-addressed store, hash-verified

799
800 @app.teardown_request
801 def teardown_request2(exc):
802 assert type(exc) is ZeroDivisionError
803 called.append(True)
804 # This raises a new error and blows away sys.exc_info(), so we can
805 # test that all teardown_requests get passed the same original
806 # exception.
807 try:
808 raise TypeError()
809 except Exception:
810 pass
811
812 @app.route("/")
813 def fails():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected