Exemplo n.º 1
0
def test_convert_pipfile(project):
    golden_file = FIXTURES / "Pipfile"
    assert pipfile.check_fingerprint(project, golden_file)
    result, settings = pipfile.convert(project, golden_file, None)

    assert settings["allow_prereleases"]
    assert result["requires-python"] == ">=3.6"

    assert not settings.get("dev-dependencies", {}).get("dev")

    assert "requests" in result["dependencies"]
    assert 'pywinusb; sys_platform == "win32"' in result["dependencies"]

    assert settings["source"][0]["url"] == "https://pypi.python.org/simple"
Exemplo n.º 2
0
def test_convert_pipfile(project):
    golden_file = FIXTURES / "Pipfile"
    assert pipfile.check_fingerprint(project, golden_file)
    result = pipfile.convert(project, golden_file)

    assert result["allow_prereleases"]
    assert result["python_requires"] == ">=3.6"

    assert not result["dev-dependencies"]

    assert result["dependencies"]["requests"] == "*"
    assert result["dependencies"]["pywinusb"]["version"] == "*"
    assert result["dependencies"]["pywinusb"]["marker"] == "sys_platform == 'win32'"

    assert result["source"][0]["url"] == "https://pypi.python.org/simple"