Exemplo n.º 1
0
def test_file_dependency_wheel():
    dependency = FileDependency(DIST_PATH / "demo-0.1.0-py2.py3-none-any.whl")

    assert dependency.is_file()
    assert dependency.name == "demo"
    assert dependency.pretty_constraint == "0.1.0"
    assert dependency.python_versions == "*"

    meta = dependency.metadata
    assert meta.requires_dist == ["pendulum (>=1.4.0.0,<2.0.0.0)"]
Exemplo n.º 2
0
def test_file_dependency_wheel():
    dependency = FileDependency(DIST_PATH / 'demo-0.1.0-py2.py3-none-any.whl')

    assert dependency.is_file()
    assert dependency.name == 'demo'
    assert dependency.pretty_constraint == '0.1.0'
    assert dependency.python_versions == '*'
    assert dependency.platform == '*'

    meta = dependency.metadata
    assert meta.requires_dist == ['pendulum (>=1.4.0.0,<2.0.0.0)']
Exemplo n.º 3
0
def test_file_dependency_wheel():
    dependency = FileDependency(DIST_PATH / "demo-0.1.0-py2.py3-none-any.whl")

    assert dependency.is_file()
    assert dependency.name == "demo"
    assert dependency.pretty_constraint == "0.1.0"
    assert dependency.python_versions == "*"
    assert dependency.platform == "*"

    meta = dependency.metadata
    assert meta.requires_dist == ["pendulum (>=1.4.0.0,<2.0.0.0)"]
Exemplo n.º 4
0
def test_file_dependency_sdist():
    dependency = FileDependency(DIST_PATH / "demo-0.1.0.tar.gz")

    assert dependency.is_file()
    assert dependency.name == "demo"
    assert dependency.pretty_constraint == "0.1.0"
    assert dependency.python_versions == "*"
    assert dependency.platform == "*"

    meta = dependency.metadata
    assert meta.requires_dist == ["pendulum (>=1.4.0.0,<2.0.0.0)"]
Exemplo n.º 5
0
def test_file_dependency_dir():
    with pytest.raises(ValueError):
        FileDependency(DIST_PATH)
Exemplo n.º 6
0
def test_file_dependency_wrong_path():
    with pytest.raises(ValueError):
        FileDependency(DIST_PATH / 'demo-0.2.0.tar.gz')