def config_file(tmpdir_factory):
    """Fixture that generates a usable configuration file."""
    tmpfile = tmpdir_factory.mktemp('data').join('config.ini')
    tmpfile.write(
        "[TestSection]\n"
        "key = value\n"
    )
    return tmpfile.strpath