(tmp_path, encoding)
| 353 | |
| 354 | @pytest.mark.parametrize("encoding", ("utf-8", "utf-16-le")) |
| 355 | def test_open_resource_with_encoding(tmp_path, encoding): |
| 356 | app = flask.Flask(__name__, root_path=os.fspath(tmp_path)) |
| 357 | (tmp_path / "test").write_text("test", encoding=encoding) |
| 358 | |
| 359 | with app.open_resource("test", mode="rt", encoding=encoding) as f: |
| 360 | assert f.read() == "test" |
nothing calls this directly
no test coverage detected