(app)
| 14 | |
| 15 | |
| 16 | def test_teardown_on_pop(app): |
| 17 | buffer = [] |
| 18 | |
| 19 | @app.teardown_request |
| 20 | def end_of_request(exception): |
| 21 | buffer.append(exception) |
| 22 | |
| 23 | ctx = app.test_request_context() |
| 24 | ctx.push() |
| 25 | assert buffer == [] |
| 26 | ctx.pop() |
| 27 | assert buffer == [None] |
| 28 | |
| 29 | |
| 30 | def test_teardown_with_previous_exception(app): |
nothing calls this directly
no test coverage detected