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

Function test_exception_propagation

tests/test_basic.py:1575–1588  ·  view source on GitHub ↗
(app, client, key)

Source from the content-addressed store, hash-verified

1573
1574@pytest.mark.parametrize("key", ["TESTING", "PROPAGATE_EXCEPTIONS", "DEBUG", None])
1575def 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])

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected