def METHOD_NAME(
    tmp_path: Path,
    filename: str,
    fmt: str | None,
    data: str,
    expected: Any,
    testing_metadata,
):
    path = tmp_path / filename
    path.write_text(data)
    assert (
        jinja_context.load_file_data(str(path), fmt, config=testing_metadata.config)
        == expected
    )