(app)
| 45 | |
| 46 | |
| 47 | def test_teardown_with_handled_exception(app): |
| 48 | buffer = [] |
| 49 | |
| 50 | @app.teardown_request |
| 51 | def end_of_request(exception): |
| 52 | buffer.append(exception) |
| 53 | |
| 54 | with app.test_request_context(): |
| 55 | assert buffer == [] |
| 56 | try: |
| 57 | raise Exception("dummy") |
| 58 | except Exception: |
| 59 | pass |
| 60 | assert buffer == [None] |
| 61 | |
| 62 | |
| 63 | def test_proper_test_request_context(app): |
nothing calls this directly
no test coverage detected
searching dependent graphs…