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:])
Esempio n. 3
0
def show_versions():
    """Print dependency information."""
    print_dependencies("cobra")
Esempio n. 4
0
def show_versions():
    """Print formatted dependency information to stdout."""
    print_dependencies("memote")
Esempio n. 5
0
def show_versions():
    """Print formatted dependency information to stdout."""
    print_dependencies("memote")
Esempio n. 6
0
def show_versions() -> None:
    """Print dependency information."""
    print_dependencies("structurizr-python")
Esempio n. 7
0
def show_versions():
    """Print all dependencies with their versions."""
    print_dependencies("sanger-sequencing")
Esempio n. 8
0
def show_versions():
    """Print dependency information."""
    print_dependencies("metanetx-assets")
Esempio n. 9
0
def show_versions() -> None:
    """Print dependency information."""
    print_dependencies("sbmlutils")
Esempio n. 10
0
def show_versions():
    """Print dependency information."""
    print_dependencies("cobra")