def METHOD_NAME(
    config: BaseConfig,
    chdir: Path,
    id: str,
    filename: str,
    cls: type[VersionProvider],
    content: str,
    expected: str,
):
    file = chdir / filename
    file.write_text(dedent(content))
    config.settings["version_provider"] = id
    provider = get_provider(config)
    assert isinstance(provider, cls)
    assert provider.get_version() == "0.1.0"
    provider.set_version("42.1")
    assert file.read_text() == dedent(expected)