コード例 #1
0
def test_deps_file():
    repo = LocalRepo(Path('tests') / 'requirements' / 'setup.py')
    coroutine = repo.get_dependencies(name='dephell', version='0.2.0')
    deps = loop.run_until_complete(asyncio.gather(coroutine))[0]
    deps = {dep.name: dep for dep in deps}
    assert set(deps) == {
        'attrs', 'cached-property', 'packaging', 'requests', 'colorama'
    }
コード例 #2
0
def test_root_dir():
    repo = LocalRepo(Path('tests') / 'requirements' / 'egg-info')
    root = repo.get_root(name='dephell', version='0.2.0')
    assert root.name == 'dephell'
    assert root.version == '0.2.1'
    assert root.links['home'] == 'https://github.com/orsinium/dephell'
コード例 #3
0
def test_root_file():
    repo = LocalRepo(Path('tests') / 'requirements' / 'setup.py')
    root = repo.get_root(name='dephell', version='0.2.0')
    assert root.name == 'dephell'
    assert root.version == '0.2.0'
    assert root.description == 'Dependency resolution for Python'