Esempio n. 1
0
def test_is_partite():
    g = graph_cycle_6()
    bol, partitions = g.is_partite(n=2)
    assert bol is True

    g = graph_cycle_5()
    bol, part = g.is_partite(n=2)
    assert bol is False
    bol, part = g.is_partite(n=5)
    assert bol is True
    assert len(part) == 5
Esempio n. 2
0
def test_is_cyclic():
    g = graph_cycle_5()
    assert g.has_cycles()