def test_config_from_pyproject(tmpdir): fn = tmpdir / "pyproject.toml" fn.write_text( textwrap.dedent(""" [tool.setuptools_scm] [project] description = "Factory ⸻ A code generator 🏭" authors = [{name = "Łukasz Langa"}] """), encoding="utf-8", ) assert Configuration.from_file(str(fn))
def test_config_from_pyproject(tmpdir): fn = tmpdir / "pyproject.toml" fn.write_text("[tool.setuptools_scm]\n", encoding="utf-8") assert Configuration.from_file(str(fn))