Beispiel #1
0
def test_groupby():
    o = Output(o0)
    groups = o.groupby()
    assert len(groups) == 1

    nodes, output = groups[0]
    assert len(nodes) == 3
    assert nodes == ['host3', 'host2', 'host1']
    assert output == exit0
Beispiel #2
0
def test_groupby3():
    o = Output(o2)
    groups = o.groupby()
    assert len(groups) == 2

    nodes, output = groups[0]
    assert len(nodes) == 2
    assert nodes == ['host3', 'host2']
    assert output == exit1

    nodes, output = groups[1]
    assert len(nodes) == 1
    assert nodes == ['host1']
    assert output == exit0