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

Function teardown_request1

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

Source from the content-addressed store, hash-verified

787
788 @app.teardown_request
789 def teardown_request1(exc):
790 assert type(exc) is ZeroDivisionError
791 called.append(True)
792 # This raises a new error and blows away sys.exc_info(), so we can
793 # test that all teardown_requests get passed the same original
794 # exception.
795 try:
796 raise TypeError()
797 except Exception:
798 pass
799
800 @app.teardown_request
801 def teardown_request2(exc):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected