(app)
| 28 | |
| 29 | |
| 30 | def test_teardown_with_previous_exception(app): |
| 31 | buffer = [] |
| 32 | |
| 33 | @app.teardown_request |
| 34 | def end_of_request(exception): |
| 35 | buffer.append(exception) |
| 36 | |
| 37 | try: |
| 38 | raise Exception("dummy") |
| 39 | except Exception: |
| 40 | pass |
| 41 | |
| 42 | with app.test_request_context(): |
| 43 | assert buffer == [] |
| 44 | assert buffer == [None] |
| 45 | |
| 46 | |
| 47 | def test_teardown_with_handled_exception(app): |
nothing calls this directly
no test coverage detected