(app, client, key)
| 1573 | |
| 1574 | @pytest.mark.parametrize("key", ["TESTING", "PROPAGATE_EXCEPTIONS", "DEBUG", None]) |
| 1575 | def test_exception_propagation(app, client, key): |
| 1576 | app.testing = False |
| 1577 | |
| 1578 | @app.route("/") |
| 1579 | def index(): |
| 1580 | raise ZeroDivisionError |
| 1581 | |
| 1582 | if key is not None: |
| 1583 | app.config[key] = True |
| 1584 | |
| 1585 | with pytest.raises(ZeroDivisionError): |
| 1586 | client.get("/") |
| 1587 | else: |
| 1588 | assert client.get("/").status_code == 500 |
| 1589 | |
| 1590 | |
| 1591 | @pytest.mark.parametrize("debug", [True, False]) |