MCPcopy
hub / github.com/pallets/flask / test_open_resource_exceptions

Function test_open_resource_exceptions

tests/test_helpers.py:370–374  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

368
369@pytest.mark.parametrize("mode", ("w", "x", "a", "r+"))
370def test_open_resource_exceptions(mode):
371 app = flask.Flask(__name__)
372
373 with pytest.raises(ValueError):
374 app.open_resource("static/index.html", mode)
375
376
377@pytest.mark.parametrize("encoding", ("utf-8", "utf-16-le"))

Callers

nothing calls this directly

Calls 1

open_resourceMethod · 0.95

Tested by

no test coverage detected