def test_convert_flit(project): golden_file = FIXTURES / "projects/flit-demo/pyproject.toml" assert flit.check_fingerprint(project, golden_file) result = flit.convert(project, golden_file) assert result["name"] == "pyflit" assert result["version"] == "0.1.0" assert result["author"] == "Thomas Kluyver <*****@*****.**>" assert result["homepage"] == "https://github.com/takluyver/flit" assert result["python_requires"] == ">=3.5" assert result["readme"] == "README.rst" assert ( result["project_urls"]["Documentation"] == "https://flit.readthedocs.io/en/latest/" ) assert result["dependencies"]["requests"] == ">=2.6" assert result["dependencies"]["configparser"]["marker"] == "python_version == '2.7'" assert sorted(result["extras"]) == ["doc", "test"] assert result["test-dependencies"]["pytest"] == ">=2.7.3" assert result["cli"]["flit"] == "flit:main" assert ( result["entry_points"]["pygments.lexers"]["dogelang"] == "dogelang.lexer:DogeLexer" ) assert result["includes"] == ["doc/"] assert result["excludes"] == ["doc/*.html"]
def test_convert_flit(project): golden_file = FIXTURES / "projects/flit-demo/pyproject.toml" assert flit.check_fingerprint(project, golden_file) result, settings = flit.convert(project, golden_file, None) assert result["name"] == "pyflit" assert result["version"] == "0.1.0" assert result["description"] == "An awesome flit demo" assert "classifiers" in result["dynamic"] assert result["authors"][0] == { "name": "Thomas Kluyver", "email": "*****@*****.**", } assert result["urls"]["homepage"] == "https://github.com/takluyver/flit" assert result["requires-python"] == ">=3.5" assert result["readme"] == "README.rst" assert result["urls"]["Documentation"] == "https://flit.readthedocs.io/en/latest/" assert result["dependencies"] == [ "requests>=2.6", 'configparser; python_version == "2.7"', ] assert result["optional-dependencies"]["test"] == [ "pytest >=2.7.3", "pytest-cov", ] assert result["scripts"]["flit"] == "flit:main" assert ( result["entry-points"]["pygments.lexers"]["dogelang"] == "dogelang.lexer:DogeLexer" ) assert settings["includes"] == ["doc/"] assert settings["excludes"] == ["doc/*.html"]