コード例 #1
0
def test_print_dependencies(capsys) -> None:
    """Expect all printed information in order."""
    depinfo.print_dependencies("depinfo")
    captured = capsys.readouterr()
    lines = captured.out.split("\n")
    assert lines[1].startswith("System Information")
    assert lines[2].startswith("==================")
    assert lines[3].startswith("OS")
    assert lines[4].startswith("OS-release")
    assert lines[5].startswith("Python")

    assert lines[7].startswith("Package Versions")
    assert lines[8].startswith("================")
    assert any(line.startswith("depinfo") for line in lines[9:])
    assert any(line.startswith("pip") for line in lines[9:])
    assert any(line.startswith("setuptools") for line in lines[9:])
    assert any(line.startswith("wheel") for line in lines[9:])
コード例 #2
0
def test_print_dependencies(capsys) -> None:
    """Expect all printed information in order."""
    with pytest.deprecated_call():
        print_dependencies("depinfo")
    captured = capsys.readouterr()
    lines = captured.out.split("\n")
    assert lines[1].startswith("Platform Information")
    assert lines[2].startswith("--------------------")

    assert lines[3].startswith(platform.system())
    assert lines[4].startswith(platform.python_implementation())

    assert lines[6].startswith("Dependency Information")
    assert lines[7].startswith("----------------------")

    assert any(line.startswith("depinfo") for line in lines[8:])
    assert any(line.startswith("pip") for line in lines[8:])
    assert any(line.startswith("setuptools") for line in lines[8:])
    assert any(line.startswith("wheel") for line in lines[8:])
コード例 #3
0
ファイル: util.py プロジェクト: nrnb/gsoc2020hemant_yadav
def show_versions():
    """Print dependency information."""
    print_dependencies("cobra")
コード例 #4
0
ファイル: utils.py プロジェクト: biosustain/memote
def show_versions():
    """Print formatted dependency information to stdout."""
    print_dependencies("memote")
コード例 #5
0
ファイル: utils.py プロジェクト: sulheim/memote
def show_versions():
    """Print formatted dependency information to stdout."""
    print_dependencies("memote")
コード例 #6
0
def show_versions() -> None:
    """Print dependency information."""
    print_dependencies("structurizr-python")
コード例 #7
0
def show_versions():
    """Print all dependencies with their versions."""
    print_dependencies("sanger-sequencing")
コード例 #8
0
ファイル: helpers.py プロジェクト: Midnighter/metanetx-assets
def show_versions():
    """Print dependency information."""
    print_dependencies("metanetx-assets")
コード例 #9
0
ファイル: utils.py プロジェクト: g-simmons/sbmlutils
def show_versions() -> None:
    """Print dependency information."""
    print_dependencies("sbmlutils")
コード例 #10
0
ファイル: util.py プロジェクト: mmundy42/cobrapy
def show_versions():
    """Print dependency information."""
    print_dependencies("cobra")