(tmp_path, encoding)
| 376 | |
| 377 | @pytest.mark.parametrize("encoding", ("utf-8", "utf-16-le")) |
| 378 | def test_open_resource_with_encoding(tmp_path, encoding): |
| 379 | app = flask.Flask(__name__, root_path=os.fspath(tmp_path)) |
| 380 | (tmp_path / "test").write_text("test", encoding=encoding) |
| 381 | |
| 382 | with app.open_resource("test", mode="rt", encoding=encoding) as f: |
| 383 | assert f.read() == "test" |
nothing calls this directly
no test coverage detected