예제 #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:])
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
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
def show_versions():
    """Print dependency information."""
    print_dependencies("metanetx-assets")
예제 #9
0
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")