def temp_pyproject(tmp_path):
    """Return function which generates pyproject.toml with the given content"""

    def generator(project_tmpl: str):
        with open(tmp_path / "pyproject.toml", "w") as fp:
            fp.write(project_tmpl)

        return tmp_path

    return generator
Return function which generates pyproject.toml with the given content
tests/conftest.py