Example #1
0
def test_print_node_versions(cap_logging_info):
    nodeenv.print_node_versions()
    printed = mck_to_out(cap_logging_info)
    assert printed.startswith(
        '0.1.14\t0.1.15\t0.1.16\t0.1.17\t0.1.18\t0.1.19\t0.1.20\t0.1.21\n')
    assert printed.endswith('\n13.1.0\t13.2.0\t13.3.0\t13.4.0\t13.5.0')
    tabs_per_line = [line.count('\t') for line in printed.splitlines()]
    # 8 items per line = 7 tabs
    # The last line contains the remaning 5 items
    assert tabs_per_line == [7] * 60 + [4]
Example #2
0
def test_print_node_versions_node(cap_logging_info):
    nodeenv.print_node_versions()
    printed = mck_to_out(cap_logging_info)
    # There's a lot of output here, let's just assert a few things
    assert printed.startswith("0.0.1\t0.0.2\t0.0.3\t0.0.4\t0.0.5\t0.0.6\t0.1.0\t0.1.1\n")
    assert printed.endswith("\n0.11.15\t0.11.16\t0.12.0")
    tabs_per_line = [line.count("\t") for line in printed.splitlines()]
    # 8 items per line = 7 tabs
    # The last line contains the remaning 3 items
    assert tabs_per_line == [7] * 28 + [2]
def test_print_node_versions_node(cap_logging_info):
    nodeenv.print_node_versions()
    printed = mck_to_out(cap_logging_info)
    # There's a lot of output here, let's just assert a few things
    assert printed.startswith(
        '0.0.1\t0.0.2\t0.0.3\t0.0.4\t0.0.5\t0.0.6\t0.1.0\t0.1.1\n')
    assert printed.endswith('\n0.11.15\t0.11.16\t0.12.0')
    tabs_per_line = [line.count('\t') for line in printed.splitlines()]
    # 8 items per line = 7 tabs
    # The last line contains the remaning 3 items
    assert tabs_per_line == [7] * 28 + [2]
Example #4
0
def test_print_node_versions_iojs(cap_logging_info):
    nodeenv.print_node_versions()
    printed = mck_to_out(cap_logging_info)
    assert printed == '1.0.0\t1.0.1\t1.0.2\t1.0.3\t1.0.4\t1.1.0'
def test_print_node_versions_iojs(cap_logging_info):
    nodeenv.print_node_versions()
    printed = mck_to_out(cap_logging_info)
    assert printed == '1.0.0\t1.0.1\t1.0.2\t1.0.3\t1.0.4\t1.1.0'